summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2017-06-23 19:59:36 -0300
committerDavid S. Miller <davem@davemloft.net>2017-06-25 14:43:53 -0400
commita02d036c027e9070ca27c156f59eb445d5405480 (patch)
treef279d0fb0ffba67245fba656819e128a2f2fee02 /net/sctp
parent4ccbd0b0b9b8b09d87c7e7b0f868eda2bed03189 (diff)
downloadlinux-a02d036c027e9070ca27c156f59eb445d5405480.tar.bz2
sctp: adjust ssthresh when transport is idle
RFC 4960 Errata 3.27 identifies that ssthresh should be adjusted to cwnd because otherwise it could cause the transport to lock into congestion avoidance phase specially if ssthresh was previously reduced by some packet drop, leading to poor performance. The Errata says to adjust ssthresh to cwnd only once, though the same goal is achieved by updating it every time we update cwnd too. The caveat is that we could take longer to get back up to speed but that should be compensated by the fact that we don't adjust on RTO basis (as RFC says) but based on Heartbeats, which are usually way longer. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-rfc4960-errata-01#section-3.27 Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index e3ebf04ddbd0..7cdd6bcddbc5 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -569,6 +569,8 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
*/
transport->cwnd = max(transport->cwnd/2,
4*asoc->pathmtu);
+ /* RFC 4960 Errata 3.27.2: also adjust sshthresh */
+ transport->ssthresh = transport->cwnd;
break;
}