Return-Path: Received: from mail-sn1nam01on0097.outbound.protection.outlook.com ([104.47.32.97]:64040 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933309AbeDIAk2 (ORCPT ); Sun, 8 Apr 2018 20:40:28 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Marcelo Ricardo Leitner , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 046/101] sctp: adjust ssthresh when transport is idle Date: Mon, 9 Apr 2018 00:35:56 +0000 Message-ID: <20180409003505.164715-46-alexander.levin@microsoft.com> References: <20180409003505.164715-1-alexander.levin@microsoft.com> In-Reply-To: <20180409003505.164715-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Marcelo Ricardo Leitner [ Upstream commit a02d036c027e9070ca27c156f59eb445d5405480 ] 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#se= ction-3.27 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/sctp/transport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index a0a431824f63..3edaca07f0f9 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -546,6 +546,8 @@ void sctp_transport_lower_cwnd(struct sctp_transport *t= ransport, */ transport->cwnd =3D max(transport->cwnd/2, 4*asoc->pathmtu); + /* RFC 4960 Errata 3.27.2: also adjust sshthresh */ + transport->ssthresh =3D transport->cwnd; break; } =20 --=20 2.15.1