From owner-dev-commits-src-all@freebsd.org Tue Jan 26 16:10:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B8B14F4784; Tue, 26 Jan 2021 16:10:50 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQBY63SLMz4c9W; Tue, 26 Jan 2021 16:10:50 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from [IPv6:2a02:8109:1140:c3d:8cdb:3c2b:1f77:6217] (unknown [IPv6:2a02:8109:1140:c3d:8cdb:3c2b:1f77:6217]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id F25F4721BE016; Tue, 26 Jan 2021 17:10:39 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: git: 6a376af0cd21 - main - TCP PRR: Patch div/0 in tcp_prr_partialack From: Michael Tuexen In-Reply-To: <202101261509.10QF94iV005231@gitrepo.freebsd.org> Date: Tue, 26 Jan 2021 17:10:39 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7F802CA2-DD8B-42E0-9DDA-559AF5EF3BB3@macmic.franken.de> References: <202101261509.10QF94iV005231@gitrepo.freebsd.org> To: Richard Scheffenegger X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4DQBY63SLMz4c9W X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 16:10:50 -0000 > On 26. Jan 2021, at 16:09, Richard Scheffenegger = wrote: >=20 > The branch main has been updated by rscheff: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6a376af0cd212be4e16d013d35a0e2ee= c1dbb8ae >=20 > commit 6a376af0cd212be4e16d013d35a0e2eec1dbb8ae > Author: Richard Scheffenegger > AuthorDate: 2021-01-26 15:06:32 +0000 > Commit: Richard Scheffenegger > CommitDate: 2021-01-26 15:06:32 +0000 >=20 > TCP PRR: Patch div/0 in tcp_prr_partialack >=20 > With clearing of recover_fs in bc7ee8e5bc555, div/0 > was observed while processing partial_acks. >=20 > Suspect that rewind of an erraneous RTO may be > causing this - with the above change, recover_fs > would no longer retained at the last calculated > value, and reset. But CC_RTO_ERR can reenable > IN_RECOVERY(), without setting this again. >=20 > Adding a safety net prior to the division in that > function, which I missed in D28114. Any plans to MFC this to stable/13? This commit intends to address an issue reported by mm@ in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252958 Best regards Michael > --- > sys/netinet/tcp_input.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c > index 4b8f91ed9d0b..459b78cd444a 100644 > --- a/sys/netinet/tcp_input.c > +++ b/sys/netinet/tcp_input.c > @@ -510,7 +510,6 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr = *th) > } > /* XXXLAS: EXIT_RECOVERY ? */ > tp->t_bytes_acked =3D 0; > - tp->sackhint.recover_fs =3D 0; > } >=20 > /* > @@ -3948,10 +3947,13 @@ tcp_prr_partialack(struct tcpcb *tp, struct = tcphdr *th) > /* > * Proportional Rate Reduction > */ > - if (pipe > tp->snd_ssthresh) > + if (pipe > tp->snd_ssthresh) { > + if (tp->sackhint.recover_fs =3D=3D 0) > + tp->sackhint.recover_fs =3D > + max(1, tp->snd_nxt - tp->snd_una); > snd_cnt =3D (tp->sackhint.prr_delivered * = tp->snd_ssthresh / > tp->sackhint.recover_fs) - = tp->sackhint.sack_bytes_rexmit; > - else { > + } else { > if (V_tcp_do_prr_conservative) > limit =3D tp->sackhint.prr_delivered - > tp->sackhint.sack_bytes_rexmit;