aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Scheffenegger <rscheff@FreeBSD.org>2021-02-20 19:10:00 +0000
committerRichard Scheffenegger <rscheff@FreeBSD.org>2021-02-20 19:11:48 +0000
commita8e431e1537d056a3f9e466eaceec28c399c220b (patch)
tree48125e948e36000caef1023f9e8eba5ec5470efe
parentf17f94cd1b99c61faa08aa988b47805c53b78ac7 (diff)
downloadsrc-a8e431e1537d056a3f9e466eaceec28c399c220b.tar.gz
src-a8e431e1537d056a3f9e466eaceec28c399c220b.zip
PRR: use accurate rfc6675_pipe when enabled
Reviewed By: #transport, tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28816
-rw-r--r--sys/netinet/tcp_input.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 39039fe5b9a3..59a5a2d6bf34 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2579,8 +2579,11 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
* estimate to be in the network.
*/
del_data = tp->sackhint.delivered_data;
- pipe = (tp->snd_nxt - tp->snd_fack) +
- tp->sackhint.sack_bytes_rexmit;
+ if (V_tcp_do_rfc6675_pipe)
+ pipe = tcp_compute_pipe(tp);
+ else
+ pipe = (tp->snd_nxt - tp->snd_fack) +
+ tp->sackhint.sack_bytes_rexmit;
tp->sackhint.prr_delivered += del_data;
if (pipe > tp->snd_ssthresh) {
if (tp->sackhint.recover_fs == 0)
@@ -3960,7 +3963,10 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th)
if (SEQ_GEQ(th->th_ack, tp->snd_una))
del_data = BYTES_THIS_ACK(tp, th);
del_data += tp->sackhint.delivered_data;
- pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit;
+ if (V_tcp_do_rfc6675_pipe)
+ pipe = tcp_compute_pipe(tp);
+ else
+ pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit;
tp->sackhint.prr_delivered += del_data;
/*
* Proportional Rate Reduction