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

(cherry picked from commit 9276ad23b872eddc42e05304acb10bf5421b043c)
This commit is contained in:
Richard Scheffenegger 2023-12-07 15:13:05 +01:00
parent cc77811bf0
commit 35707083c6

View file

@ -3972,7 +3972,7 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to)
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 {
if (V_tcp_do_prr_conservative || (del_data == 0))
limit = tp->sackhint.prr_delivered -