git: 34c45bc6a394 - main - tcp: enable LRD by default

From: Richard Scheffenegger <rscheff_at_FreeBSD.org>
Date: Thu, 30 Nov 2023 15:30:02 UTC
The branch main has been updated by rscheff:

URL: https://cgit.FreeBSD.org/src/commit/?id=34c45bc6a3940ccfddb60207cb103f73bf87c4a6

commit 34c45bc6a3940ccfddb60207cb103f73bf87c4a6
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2023-11-30 04:33:50 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2023-11-30 04:38:16 +0000

    tcp: enable LRD by default
    
    Lost Retransmission Detection was added as a
    feature in May 2021, but disabled by default.
    
    Enabling the feature by default to reduce the
    flow completion time by avoiding RTOs when
    retransmissions get lost too.
    
    Reviewed By:           tuexen, #transport, zlei
    MFC after:             10 weeks
    Sponsored by:          NetApp, Inc.
    Differential Revision: https://reviews.freebsd.org/D42845
---
 share/man/man4/tcp.4    | 4 ++--
 sys/netinet/tcp_input.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
index 3f54d904abc8..317ee818f3a4 100644
--- 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 30, 2023
 .Dt TCP 4
 .Os
 .Sh NAME
@@ -465,7 +465,7 @@ 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
+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.
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index e20c09f981cd..a75dbd1547b0 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -162,7 +162,7 @@ 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) = 0;
+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");