From owner-dev-commits-src-branches@freebsd.org Wed Jun 9 00:13:11 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 A15B7641699; Wed, 9 Jun 2021 00:13:11 +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 4G06yH46x0z3mZf; Wed, 9 Jun 2021 00:13:11 +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 7566112BCA; Wed, 9 Jun 2021 00:13:11 +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 1590DB2n071255; Wed, 9 Jun 2021 00:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1590DBhr071254; Wed, 9 Jun 2021 00:13:11 GMT (envelope-from git) Date: Wed, 9 Jun 2021 00:13:11 GMT Message-Id: <202106090013.1590DBhr071254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e99fa57b981e - stable/13 - tcp: Fix an issue with the PUSH bit as well as fill in the missing mtu change for fsb's MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e99fa57b981eaeac287a1d0d8c0b351740f7a30b 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: Wed, 09 Jun 2021 00:13:11 -0000 The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e99fa57b981eaeac287a1d0d8c0b351740f7a30b commit e99fa57b981eaeac287a1d0d8c0b351740f7a30b Author: Randall Stewart AuthorDate: 2021-05-24 18:42:15 +0000 Commit: Michael Tuexen CommitDate: 2021-06-09 00:12:21 +0000 tcp: Fix an issue with the PUSH bit as well as fill in the missing mtu change for fsb's The push bit itself was also not actually being properly moved to the right edge. The FIN bit was incorrectly on the left edge. We fix these two issues as well as plumb in the mtu_change for alternate stacks. Reviewed by: mtuexen Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D30413 (cherry picked from commit 631449d5d03506295eaa6947c1b0e8a168a2f6b7) --- sys/netinet/tcp_stacks/rack.c | 8 ++++++-- sys/netinet/tcp_subr.c | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c870b286a847..0bdcc20d2b7c 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -6058,8 +6058,12 @@ rack_clone_rsm(struct tcp_rack *rack, struct rack_sendmap *nrsm, if (nrsm->r_flags & RACK_HAS_SYN) nrsm->r_flags &= ~RACK_HAS_SYN; /* Now if we have a FIN flag we keep it on the right edge */ - if (nrsm->r_flags & RACK_HAS_FIN) - nrsm->r_flags &= ~RACK_HAS_FIN; + if (rsm->r_flags & RACK_HAS_FIN) + rsm->r_flags &= ~RACK_HAS_FIN; + /* Push bit must go to the right edge as well */ + if (rsm->r_flags & RACK_HAD_PUSH) + rsm->r_flags &= ~RACK_HAD_PUSH; + /* * Now we need to find nrsm's new location in the mbuf chain * we basically calculate a new offset, which is soff + diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b9da908d2a15..bb2c35c76fde 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -3373,6 +3373,15 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) tp->snd_recover = tp->snd_max; if (tp->t_flags & TF_SACK_PERMIT) EXIT_FASTRECOVERY(tp->t_flags); + if (tp->t_fb->tfb_tcp_mtu_chg != NULL) { + /* + * Conceptually the snd_nxt setting + * and freeing sack holes should + * be done by the default stacks + * own tfb_tcp_mtu_chg(). + */ + tp->t_fb->tfb_tcp_mtu_chg(tp); + } tp->t_fb->tfb_tcp_output(tp); }