From nobody Thu Nov 30 20:40:42 2023 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 4Sh7PR31vnz52XcQ; Thu, 30 Nov 2023 20:40:43 +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 4Sh7PR0F90z3SJn; Thu, 30 Nov 2023 20:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701376843; 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=7U6eiFauXxMtnmyAcRTkbPHKsSnyiAvfxGtH/F5GG0M=; b=S/U0tI//g1QZ2UNd3eyEoyCzCoZ8Bc9tVAVFAMujIJV2lbOHwoviFMprrTpoD82DeP4yK1 3CLphLKqcDLUEpX8HOWYlj9UYiSD1UqU6XYUqZYvS+dP1ahukynoGr6bO3GlPUnQDl6taC RSXZQu/o6/OaG+diXFjidRt8SFeySooV5tXdShdczhDt1iJxrTLDoAyfK4Py8DnIC1jtEm fN1+Seca5cQlwI/0/xBPxZpXCM/dPUtBRaCfJXuMMYsEvebLmYU8+SvvvPQj48ZuJnjApc 4bFZxSn/QhliI0w43L8i3i7PrOX6fCkg9e5Sw30c46nWiJ+gV6+xF1z6YXJ8sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701376843; 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=7U6eiFauXxMtnmyAcRTkbPHKsSnyiAvfxGtH/F5GG0M=; b=wQ5G6r8jlhTuQx3oVe8Zx7eHGgIzy5jgRp29JPO4UZDn1mcMUpdirgSg5lqvQ58+9tPN0y P9J2nGDdJZe8Ug1Ozvx1DP6xd3FgnXXurGQQwTth8Y+gsmqdaOSskmc0xWbCng8FUUz7Vw T6V8MN3fv3QHYbjyg43CkUIDko0ekokO4YgGMjBSnLBHj9YlS/aOnB2uIeTTKBSp4Wa5Sj nSPXGuHDhlV0/nsqvIgwbYNZr0jAPWmQ0ylMB4yVYTQubjdpch06/igIyBpYiDR0R626iB FvZbMs0Y4e9h6X+fPHcP9JpZX4uXQb4fBqsBmHKdbUrw8S7NsjmmCwhX47m87A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701376843; a=rsa-sha256; cv=none; b=wgsV6fovuFM9ijK4hbuI24YtyyveGMNtbWaOoRkH2zr5ldFKe/Lj+q2J9KZz2AMHaYEhjD pijKR0Q1bpwy8ousLwfaAeNM/K6J5mUiEyTrLbSr7b+LJ6lXweCrh6G9wuQhdSbvnyNdth D2HfliJK/W+wlzPykKeNBR73WhtYHnCeoYQmq7jq8KN7tNpsu8P0Ob7b7esHUiycr2+WM4 gYx77dsicHFhj2Xm/menv4N3D1vLqXoB5USiN7FA/Vu6G9JaHO7bpOJiC1Fco24KA/Emic F1UuLtJjSDANgR908hSI4fZ9qMDnjey60SnAzOxAVxEA0+SNuwULDlgTCDd5hQ== 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 4Sh7PQ6QPdz14Q4; Thu, 30 Nov 2023 20:40:42 +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 3AUKegdk065907; Thu, 30 Nov 2023 20:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AUKegfx065904; Thu, 30 Nov 2023 20:40:42 GMT (envelope-from git) Date: Thu, 30 Nov 2023 20:40:42 GMT Message-Id: <202311302040.3AUKegfx065904@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: f42518ff1250 - main - tcp: for LRD move sysctl from tcp.do_lrd tp tcp.sack.lrd, remove sockopt 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f42518ff1250fcc76a0a1eed9f411edbbb172541 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=f42518ff1250fcc76a0a1eed9f411edbbb172541 commit f42518ff1250fcc76a0a1eed9f411edbbb172541 Author: Richard Scheffenegger AuthorDate: 2023-11-30 20:10:14 +0000 Commit: Richard Scheffenegger CommitDate: 2023-11-30 20:11:45 +0000 tcp: for LRD move sysctl from tcp.do_lrd tp tcp.sack.lrd, remove sockopt Moving lrd sysctl to the tcp.sack branch, since LRD only works with SACK. Remove the sockopt to programmatically control LRD per session. Reviewed By: #transport, tuexen, rrs Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42851 --- share/man/man4/tcp.4 | 14 +++++++------- sys/netinet/tcp.h | 1 - sys/netinet/tcp_input.c | 5 ----- sys/netinet/tcp_sack.c | 5 +++++ sys/netinet/tcp_usrreq.c | 9 --------- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 317ee818f3a4..4ebdbac3a3ca 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -464,13 +464,6 @@ See Maximum amount of time, in milliseconds, before a delayed ACK is sent. .It Va delayed_ack Delay ACK to try and piggyback it onto a data packet or another ACK. -.It Va do_lrd -Enable Lost Retransmission Detection for SACK-enabled sessions, enabled by -default. -Under severe congestion, a retransmission can be lost which then leads to a -mandatory Retransmission Timeout (RTO), followed by slow-start. -LRD will try to resend the repeatedly lost packet, preventing the time-consuming -RTO and performance reducing slow-start. .It Va do_prr Perform SACK loss recovery using the Proportional Rate Reduction (PRR) algorithm described in RFC6937. @@ -901,6 +894,13 @@ Global number of TCP SACK holes currently allocated. .It Va sack.globalmaxholes Maximum number of SACK holes per system, across all connections. Defaults to 65536. +.It Va sack.lrd +Enable Lost Retransmission Detection for SACK-enabled sessions, enabled by +default. +Under severe congestion, a retransmission can be lost which then leads to a +mandatory Retransmission Timeout (RTO), followed by slow-start. +LRD will try to resend the repeatedly lost packet, preventing the time-consuming +RTO and performance reducing slow-start or purge of the SACK scoreboard. .It Va sack.maxholes Maximum number of SACK holes per connection. Defaults to 128. diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 70fab2c6a2d2..44f8a67a1e64 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -200,7 +200,6 @@ struct tcphdr { #define TCP_PROC_ACCOUNTING 76 /* Do accounting on tcp cpu usage and counts */ #define TCP_USE_CMP_ACKS 77 /* The transport can handle the Compressed mbuf acks */ #define TCP_PERF_INFO 78 /* retrieve accounting counters */ -#define TCP_LRD 79 /* toggle Lost Retransmission Detection for A/B testing */ #define TCP_KEEPINIT 128 /* N, time to establish connection */ #define TCP_KEEPIDLE 256 /* L,N,X start keeplives after this period */ #define TCP_KEEPINTVL 512 /* L,N interval between keepalives */ diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a75dbd1547b0..b26ae92a767e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -162,11 +162,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_prr, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_prr), 1, "Enable Proportional Rate Reduction per RFC 6937"); -VNET_DEFINE(int, tcp_do_lrd) = 1; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_lrd, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(tcp_do_lrd), 1, - "Perform Lost Retransmission Detection"); - VNET_DEFINE(int, tcp_do_newcwv) = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, newcwv, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_newcwv), 0, diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 2d2be7ff922f..e8ed3c52fd67 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -132,6 +132,11 @@ SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, revised, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_newsack), 0, "Use revised SACK loss recovery per RFC 6675"); +VNET_DEFINE(int, tcp_do_lrd) = 1; +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_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_usrreq.c b/sys/netinet/tcp_usrreq.c index 14e0b814dec9..93fdedc03c7b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2118,7 +2118,6 @@ tcp_default_ctloutput(struct tcpcb *tp, struct sockopt *sopt) case TCP_NODELAY: case TCP_NOOPT: - case TCP_LRD: INP_WUNLOCK(inp); error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); @@ -2133,9 +2132,6 @@ tcp_default_ctloutput(struct tcpcb *tp, struct sockopt *sopt) case TCP_NOOPT: opt = TF_NOOPT; break; - case TCP_LRD: - opt = TF_LRD; - break; default: opt = 0; /* dead code to fool gcc */ break; @@ -2657,11 +2653,6 @@ unhold: sizeof(optval)); break; #endif - case TCP_LRD: - optval = tp->t_flags & TF_LRD; - INP_WUNLOCK(inp); - error = sooptcopyout(sopt, &optval, sizeof optval); - break; default: INP_WUNLOCK(inp); error = ENOPROTOOPT;