From nobody Wed May 08 12:55:22 2024 X-Original-To: dev-commits-src-main@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 4VZFVg1gJjz5J4Bl; Wed, 08 May 2024 12:55:23 +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 4VZFVf4wW0z4Pcv; Wed, 8 May 2024 12:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715172922; 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=AC2zNT52eG7R64FGojJUElNpQdrOB1VKwIW4Pp2EZWs=; b=MCkK+M/iK/48JZtlxehXIzzSeZkQRrlFxg07e/HFPzjwERM11D/C4J5e3WGvhYn2oghZC3 0LO7eFewb+fMEm1maeUQydmDxfxiyWR81n1Dk3LQj5MF6SuYNs3gLtg354O6dfzHxoPX9q 2FzwpDadhxKQQqd6VSONxT5DtIbvaP5BxeGZe3yOLtw0qO3bwX06NMkmOK2OY44ZQwtqmW t9fSKa/2ClYdq9IB9VNLi4B1W5t5oCZuQsFsfb1rPn2lIaW4SLTFfu0qmA/QDcWDK/Srj5 g/L8Xa27L5a7Rxto+caQeYTWquWTs7d0skJJ0XtD6/jye+TXHC6IzKQhMrEu/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715172922; a=rsa-sha256; cv=none; b=O9wUZhxBCeTYvgrdh25WK33ehrq/VHIA0hmEVkKTnkYqn2HPD5p26GcyraO1+He8jaMNPV Oc+U1HHoxJonXuDS8a6gOXgjgdiY77+gfCPPESQZlS/kB16j+G8XG2CJdY5Hsllf0JDiC4 cpodnZeA1MyFTqVtgXpKjprKFYDlu/X8mJJ0CAY2/oNrrt4edHFu5tL/hLHEb5TJQTRtmO jQsCOQ03I/AuPWY5frmw3QpFeEuMbFCKrvuAIz7KYJrmIvxt40lDR5akChGh9CrzGiVp7V x9LWvkpn1BhfwV7n9m65yDpfQxWEgvqwD6hFZ2IArO/iDgMlS84o4y2V1A6RUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715172922; 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=AC2zNT52eG7R64FGojJUElNpQdrOB1VKwIW4Pp2EZWs=; b=Z6WmVQWIUVXsqotIN+WDa76nhg476qS7f/C6oFnwYhCmlvUAp02cZcih2LoJD/I9FzTlZd VW22yDKSyMgpqJNr3kcBm7vnfjfvfFz1V9rg3+TVYOQnGMnL7MrqQBG/u09G5LRDSv44Hc /AJNeB/lkp+MeUqhozS3XZ0kaM/XdLad/gc58iZN+seHQCtd0nWtvHKExXyKOSkm2bFyUw 3SWCGQgvrGHozXbedtaUhmnQGMOb84OoAQrhTDn0hx/v6vT/5zvEW1jP67VlDTU5POI5up c90LBZb3NY+SAfyvZkNIw/+Q0unn9QXLTXgdzpnnuEAaM662+sLtApgn4J6+Ag== 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 4VZFVf4F5vzQJ2; Wed, 8 May 2024 12:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 448CtMta061856; Wed, 8 May 2024 12:55:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 448CtMlp061853; Wed, 8 May 2024 12:55:22 GMT (envelope-from git) Date: Wed, 8 May 2024 12:55:22 GMT Message-Id: <202405081255.448CtMlp061853@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: dcdfe44901ec - main - tcp: add sysctl to allow/disallow TSO during SACK loss recovery List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: dcdfe44901eca56254ac41b11b6c7b730a276935 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=dcdfe44901eca56254ac41b11b6c7b730a276935 commit dcdfe44901eca56254ac41b11b6c7b730a276935 Author: Richard Scheffenegger AuthorDate: 2024-05-08 12:33:12 +0000 Commit: Richard Scheffenegger CommitDate: 2024-05-08 12:33:20 +0000 tcp: add sysctl to allow/disallow TSO during SACK loss recovery Introduce net.inet.tcp.sack.tso for future use when TSO is ready to be used during loss recovery. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D45068 --- sys/netinet/tcp_output.c | 2 +- sys/netinet/tcp_sack.c | 5 +++++ sys/netinet/tcp_var.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 2bbc9414197c..e64b7701c453 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -560,7 +560,7 @@ 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 && + tp->rcv_numsacks == 0 && ((sack_rxmit == 0) || V_tcp_sack_tso) && ipoptlen == 0 && !(flags & TH_SYN)) tso = 1; diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index a8cc84397d34..53a181703fe9 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -137,6 +137,11 @@ SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, lrd, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_lrd), 1, "Perform Lost Retransmission Detection"); +VNET_DEFINE(int, tcp_sack_tso) = 0; +SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, tso, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_sack_tso), 0, + "Allow TSO during SACK loss recovery"); + VNET_DEFINE(int, tcp_sack_maxholes) = 128; SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_sack_maxholes), 0, diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f0a034bd1ea7..6d60c21e64e9 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1291,6 +1291,7 @@ VNET_DECLARE(int, tcp_retries); VNET_DECLARE(int, tcp_sack_globalholes); VNET_DECLARE(int, tcp_sack_globalmaxholes); VNET_DECLARE(int, tcp_sack_maxholes); +VNET_DECLARE(int, tcp_sack_tso); VNET_DECLARE(int, tcp_sc_rst_sock_fail); VNET_DECLARE(int, tcp_sendspace); VNET_DECLARE(int, tcp_udp_tunneling_overhead); @@ -1337,6 +1338,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) #define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) #define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) +#define V_tcp_sack_tso VNET(tcp_sack_tso) #define V_tcp_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail) #define V_tcp_sendspace VNET(tcp_sendspace) #define V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead)