From nobody Thu Nov 14 17:15:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq6Gj5zVXz5cvXt; Thu, 14 Nov 2024 17:15:09 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq6Gj4Qjvz4y29; Thu, 14 Nov 2024 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731604509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0MopInfDcsLQC2QVdMp5ySUnbheohr+YD86QQsZluo=; b=Ao7uYXVQP9q/GcTDd71waOnXJPqWn5PQxkjX5pLUvyAeimSkg8FlUMUNzWjNxH7gn6OUW0 gypgPSlQUhiy/0t+jKmgqx0gUY1vMPYFwklZGjOieSlgt3CNSENSCYhkvK0/ejrRMf+DQE FXTJfbBdnruw7sXBQU+cfMqdgmqTNluQnVC1gGwfsdPsW1jgsI2m162zBGT5JSRRoW1VQ4 Q6skqAh5KUPEczeNAQsTg+gltmiAR/equu0NBdDZcs07JF1+DERhEH8MfCG1qXBHx2UmWm jpH8wZkg+G2TgQT/PTQoFOQGYpY7fCt+XH+3LBGhyALWdZvGgEG+x8yrNFCh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731604509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0MopInfDcsLQC2QVdMp5ySUnbheohr+YD86QQsZluo=; b=mCEfDuQ0eUAiFvk+LTHgYpp1C8P+v38oOgpTW89NzriBkntoOyTuZXq/N6CTNF7mZdKPER G3azQsxYK0MnzVZF5a9mSw1LU0nVA1dbqtzuL0K2213zj2FfKU69ubkYkbLx5eTdNls440 k3/hWse59lXwOvl6uTB4N9lyp/IZqcBmQ+HjitZRJnvcAQY24keh4sWtHvV2pCMEIWiPuM l0eW7EeL2m3hfjLFhplIxiv0EkWLLoXbs5mTYdjkwzPlpbRVx1M31SAzk99UvSs6WgC54O tlZtFy4OFYzQHNo7jRukbpo3BBh0PUdpvsgQR/RjgXbu6LmI1Vvtielh/M+/+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731604509; a=rsa-sha256; cv=none; b=wUpVgnl1xNssXYZynJ2SeJS/onPwSag96ZL3dMx/KQIlCP7VgO7mX3alvhGXG3JpGwONzn +HodrIInmi8fQxIOeJVRj2dnf3MCKoHNFtCtqWx5iWT1shJ2qiFKq8ynvgrMskWKUZaXD0 T/zp+GSQmP93PjOrz7XZVOXS9YCk8H8hp5Y8EruRpfcQhWjN+dUGP5ZQYnIIWHTDPWUy4k TaN06Qqy+Z9UwsRzZpRZRTt9g4K1CxD88hzrp7xZFljLrL3GBkHeuF5N5dIHctQTs+iML7 HMpVKMR8L8XD/SAiIavmquOKk43S2PQLIBtuanzeNRWokoTPpqi9/YMbm/q1cg== 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 4Xq6Gj41z0zndC; Thu, 14 Nov 2024 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEHF9r3066346; Thu, 14 Nov 2024 17:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEHF9JT066343; Thu, 14 Nov 2024 17:15:09 GMT (envelope-from git) Date: Thu, 14 Nov 2024 17:15:09 GMT Message-Id: <202411141715.4AEHF9JT066343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: c9047eb7b30d - main - tcp: allow TSO even while RX path is unordered List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/main X-Git-Reftype: branch X-Git-Commit: c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 commit c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 Author: Richard Scheffenegger AuthorDate: 2024-11-14 07:38:30 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 08:15:53 +0000 tcp: allow TSO even while RX path is unordered Over IP networks, forward and return path largely act independently from each other. Do not disable LRO on the TX side, when reordering/loss is happening on the RX half-connection. Reviewed By: rrs, #transport, peter.lei_ieee.org Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47056 --- sys/netinet/tcp_output.c | 8 ++++---- sys/netinet/tcp_stacks/bbr.c | 1 - sys/netinet/tcp_stacks/rack.c | 5 +---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 8f19885f6b9b..38ce2e3f3145 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -513,8 +513,8 @@ after_sack_rexmit: * hardware). * * TSO may only be used if we are in a pure bulk sending state. The - * presence of TCP-MD5, SACK retransmits, SACK advertizements and - * IP options prevent using TSO. With TSO the TCP header is the same + * presence of TCP-MD5, IP options (IPsec), and possibly SACK + * retransmits prevent using TSO. With TSO the TCP header is the same * (except for the sequence number) for all generated packets. This * makes it impossible to transmit any options which vary per generated * segment or packet. @@ -556,9 +556,9 @@ after_sack_rexmit: if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ((sack_rxmit == 0) || V_tcp_sack_tso) && + ((sack_rxmit == 0) || V_tcp_sack_tso) && (ipoptlen == 0 || (ipoptlen == ipsec_optlen && - (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && + (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && !(flags & TH_SYN)) tso = 1; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 866ae29eef45..4ab12884b379 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -12619,7 +12619,6 @@ recheck_resend: (len > maxseg) && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ipoptlen == 0) tso = 1; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index e77604820b63..30b0704ed7d6 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -20708,7 +20708,7 @@ again: if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > segsiz && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && sack_rxmit == 0 && + sack_rxmit == 0 && ipoptlen == 0) tso = 1; { @@ -20910,7 +20910,6 @@ just_return_nolock: rack_use_rfo && ((flags & (TH_SYN|TH_FIN)) == 0) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22550,7 +22549,6 @@ enobufs: ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22578,7 +22576,6 @@ enobufs: ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && (rack->r_must_retran == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) &&