git: 9276ad23b872 - main - tcp: shift PRR sending cadence slightly left

From: Richard Scheffenegger <rscheff_at_FreeBSD.org>
Date: Thu, 07 Dec 2023 14:40:21 UTC
The branch main has been updated by rscheff:

URL: https://cgit.FreeBSD.org/src/commit/?id=9276ad23b872eddc42e05304acb10bf5421b043c

commit 9276ad23b872eddc42e05304acb10bf5421b043c
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2023-12-07 14:13:05 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2023-12-07 14:37:45 +0000

    tcp: shift PRR sending cadence slightly left
    
    Don't let PRR pass up on the opportunity of clocking
    out packets on arrival of ACKs - by pulling sends
    forward by about half a packet. Prevents unexpectedly
    long runs of incoming ACKs without eliciting a
    packet transmission.
    
    MFC after:             1 week
    Reviewed By:           #transport, tuexen
    Sponsored by:          NetApp, Inc.
    Differential Revision: https://reviews.freebsd.org/D42918
---
 sys/netinet/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index b26ae92a767e..05f9a4a9726a 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -3970,7 +3970,7 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, sackstatu
 			    imax(1, tp->snd_nxt - tp->snd_una);
 		snd_cnt = howmany((long)tp->sackhint.prr_delivered *
 			    tp->snd_ssthresh, tp->sackhint.recover_fs) -
-			    tp->sackhint.prr_out;
+			    tp->sackhint.prr_out + maxseg - 1;
 	} else {
 		/*
 		 * PRR 6937bis heuristic: