Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 2021 17:10:39 +0100
From:      Michael Tuexen <Michael.Tuexen@macmic.franken.de>
To:        Richard Scheffenegger <rscheff@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 6a376af0cd21 - main - TCP PRR: Patch div/0 in tcp_prr_partialack
Message-ID:  <7F802CA2-DD8B-42E0-9DDA-559AF5EF3BB3@macmic.franken.de>
In-Reply-To: <202101261509.10QF94iV005231@gitrepo.freebsd.org>
References:  <202101261509.10QF94iV005231@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 26. Jan 2021, at 16:09, Richard Scheffenegger <rscheff@FreeBSD.org> =
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 <rscheff@FreeBSD.org>
> AuthorDate: 2021-01-26 15:06:32 +0000
> Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
> 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;




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7F802CA2-DD8B-42E0-9DDA-559AF5EF3BB3>