git: f69b9760c202 - stable/13 - tcp: Use PRR for ECN congestion recovery
Richard Scheffenegger
rscheff at FreeBSD.org
Thu Apr 22 18:31:18 UTC 2021
The branch stable/13 has been updated by rscheff:
URL: https://cgit.FreeBSD.org/src/commit/?id=f69b9760c202b9e3a320915f1c9e75ed96142872
commit f69b9760c202b9e3a320915f1c9e75ed96142872
Author: Richard Scheffenegger <rscheff at FreeBSD.org>
AuthorDate: 2021-03-26 01:05:22 +0000
Commit: Richard Scheffenegger <rscheff at FreeBSD.org>
CommitDate: 2021-04-22 18:28:54 +0000
tcp: Use PRR for ECN congestion recovery
MFC after: 2 weeks
Reviewed By: #transport, rrs
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28972
(cherry picked from commit b9f803b7d4b7ee3799ab94f66c02c3b6e58c153a)
---
sys/netinet/tcp_input.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 3f2df998fd9e..67f16b77d041 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2786,6 +2786,16 @@ resume_partialack:
tcp_newreno_partial_ack(tp, th);
} else
cc_post_recovery(tp, th);
+ } else if (IN_CONGRECOVERY(tp->t_flags)) {
+ if (SEQ_LT(th->th_ack, tp->snd_recover)) {
+ if (V_tcp_do_prr) {
+ tp->sackhint.delivered_data = BYTES_THIS_ACK(tp, th);
+ tp->snd_fack = th->th_ack;
+ tcp_do_prr_ack(tp, th);
+ (void) tcp_output(tp);
+ }
+ } else
+ cc_post_recovery(tp, th);
}
/*
* If we reach this point, ACK is not a duplicate,
@@ -3952,8 +3962,12 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th)
* If there is going to be a SACK retransmission, adjust snd_cwnd
* accordingly.
*/
- tp->snd_cwnd = imax(maxseg, tp->snd_nxt - tp->snd_recover +
- tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg));
+ if (IN_FASTRECOVERY(tp->t_flags)) {
+ tp->snd_cwnd = imax(maxseg, tp->snd_nxt - tp->snd_recover +
+ tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg));
+ } else if (IN_CONGRECOVERY(tp->t_flags))
+ tp->snd_cwnd = imax(maxseg, pipe - del_data +
+ (snd_cnt * maxseg));
}
/*
More information about the dev-commits-src-branches
mailing list