Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9ac4f08b
Commit
9ac4f08b
authored
Oct 21, 2004
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications.
Signed-off-by:
Sridhar Samudrala
<
sri@us.ibm.com
>
parent
ac49b054
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
net/sctp/associola.c
net/sctp/associola.c
+4
-3
net/sctp/transport.c
net/sctp/transport.c
+14
-13
No files found.
net/sctp/associola.c
View file @
9ac4f08b
...
...
@@ -482,14 +482,15 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
/* 7.2.1 Slow-Start
*
* o The initial cwnd before data transmission or after a
* sufficiently long idle period MUST be <= 2*MTU.
* o The initial cwnd before DATA transmission or after a sufficiently
* long idle period MUST be set to
* min(4*MTU, max(2*MTU, 4380 bytes))
*
* o The initial value of ssthresh MAY be arbitrarily high
* (for example, implementations MAY use the size of the
* receiver advertised window).
*/
peer
->
cwnd
=
asoc
->
pmtu
*
2
;
peer
->
cwnd
=
min
(
4
*
asoc
->
pmtu
,
max_t
(
__u32
,
2
*
asoc
->
pmtu
,
4380
))
;
/* At this point, we may not have the receiver's advertised window,
* so initialize ssthresh to the default value and it will be set
...
...
net/sctp/transport.c
View file @
9ac4f08b
...
...
@@ -421,15 +421,15 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
{
switch
(
reason
)
{
case
SCTP_LOWER_CWND_T3_RTX
:
/* RFC 2960 Section 7.2.3, sctpimpguide
-05 Section 2.9.2
/* RFC 2960 Section 7.2.3, sctpimpguide
* When the T3-rtx timer expires on an address, SCTP should
* perform slow start by:
* ssthresh = max(cwnd/2,
2
*MTU)
* ssthresh = max(cwnd/2,
4
*MTU)
* cwnd = 1*MTU
* partial_bytes_acked = 0
*/
transport
->
ssthresh
=
max
(
transport
->
cwnd
/
2
,
2
*
transport
->
asoc
->
pmtu
);
4
*
transport
->
asoc
->
pmtu
);
transport
->
cwnd
=
transport
->
asoc
->
pmtu
;
break
;
...
...
@@ -439,15 +439,15 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
* were last sent, according to the formula described in
* Section 7.2.3.
*
* RFC 2960 7.2.3, sctpimpguide
-05 2.9.2 Upon detection of
*
packet
losses from SACK (see Section 7.2.4), An endpoint
* RFC 2960 7.2.3, sctpimpguide
Upon detection of packet
* losses from SACK (see Section 7.2.4), An endpoint
* should do the following:
* ssthresh = max(cwnd/2,
2
*MTU)
* ssthresh = max(cwnd/2,
4
*MTU)
* cwnd = ssthresh
* partial_bytes_acked = 0
*/
transport
->
ssthresh
=
max
(
transport
->
cwnd
/
2
,
2
*
transport
->
asoc
->
pmtu
);
4
*
transport
->
asoc
->
pmtu
);
transport
->
cwnd
=
transport
->
ssthresh
;
break
;
...
...
@@ -467,23 +467,24 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
if
((
jiffies
-
transport
->
last_time_ecne_reduced
)
>
transport
->
rtt
)
{
transport
->
ssthresh
=
max
(
transport
->
cwnd
/
2
,
2
*
transport
->
asoc
->
pmtu
);
4
*
transport
->
asoc
->
pmtu
);
transport
->
cwnd
=
transport
->
ssthresh
;
transport
->
last_time_ecne_reduced
=
jiffies
;
}
break
;
case
SCTP_LOWER_CWND_INACTIVE
:
/* RFC 2960 Section 7.2.1, sctpimpguide
-05 Section 2.14.2
* When the
association
does not transmit data on a given
* transport address
within an RTO, the cwnd of the transport
*
address should be adjusted to 2*MTU
.
/* RFC 2960 Section 7.2.1, sctpimpguide
* When the
endpoint
does not transmit data on a given
* transport address
, the cwnd of the transport address
*
should be adjusted to max(cwnd/2, 4*MTU) per RTO
.
* NOTE: Although the draft recommends that this check needs
* to be done every RTO interval, we do it every hearbeat
* interval.
*/
if
((
jiffies
-
transport
->
last_time_used
)
>
transport
->
rto
)
transport
->
cwnd
=
2
*
transport
->
asoc
->
pmtu
;
transport
->
cwnd
=
max
(
transport
->
cwnd
/
2
,
4
*
transport
->
asoc
->
pmtu
);
break
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment