diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 17, 2023 +.Dd November 29, 2023 .Dt TCP 4 .Os .Sh NAME @@ -464,13 +464,6 @@ 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, disabled 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 @@ .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_input.c b/sys/netinet/tcp_input.c --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -162,11 +162,6 @@ &VNET_NAME(tcp_do_prr), 1, "Enable Proportional Rate Reduction per RFC 6937"); -VNET_DEFINE(int, tcp_do_lrd) = 0; -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 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -132,6 +132,11 @@ &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,