From owner-dev-commits-src-branches@freebsd.org Sat May 1 09:03:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 2406D63B044; Sat, 1 May 2021 09:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FXNZ50LgGz3qWh; Sat, 1 May 2021 09:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0B4814FB5; Sat, 1 May 2021 09:03:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14193Ond022837; Sat, 1 May 2021 09:03:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14193OSE022836; Sat, 1 May 2021 09:03:24 GMT (envelope-from git) Date: Sat, 1 May 2021 09:03:24 GMT Message-Id: <202105010903.14193OSE022836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: bb9dcbf1a243 - stable/13 - tcp: stop spurious rescue retransmissions and potential asserts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb9dcbf1a243ac92855c0109fd922c2ba60eb691 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2021 09:03:25 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=bb9dcbf1a243ac92855c0109fd922c2ba60eb691 commit bb9dcbf1a243ac92855c0109fd922c2ba60eb691 Author: Richard Scheffenegger AuthorDate: 2021-04-28 12:56:14 +0000 Commit: Richard Scheffenegger CommitDate: 2021-05-01 08:26:53 +0000 tcp: stop spurious rescue retransmissions and potential asserts Reported by: pho@ MFC after: 3 days Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29970 (cherry picked from commit 48be5b976e34022862da3be69350d60e969d39e5) --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_sack.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9905fc01ced8..eec722d8097e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -510,6 +510,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) } /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; + tp->sackhint.delivered_data = 0; tp->sackhint.prr_out = 0; } diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 40d63bd3832f..9187a9fc66d8 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -866,9 +866,11 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) tcp_seq highdata = tp->snd_max; if (tp->t_flags & TF_SENTFIN) highdata--; - if (th->th_ack != highdata) + if (th->th_ack != highdata) { + tp->snd_fack = th->th_ack; (void)tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, highdata - maxseg), highdata, NULL); + } } (void) tp->t_fb->tfb_tcp_output(tp); }