git: af5916594bcb - stable/13 - tcp: Prepare PRR to work with NewReno LossRecovery
Richard Scheffenegger
rscheff at FreeBSD.org
Thu Apr 22 18:31:19 UTC 2021
The branch stable/13 has been updated by rscheff:
URL: https://cgit.FreeBSD.org/src/commit/?id=af5916594bcb13733acd6b40b69bce6796331fde
commit af5916594bcb13733acd6b40b69bce6796331fde
Author: Richard Scheffenegger <rscheff at FreeBSD.org>
AuthorDate: 2021-04-08 16:52:20 +0000
Commit: Richard Scheffenegger <rscheff at FreeBSD.org>
CommitDate: 2021-04-22 18:28:54 +0000
tcp: Prepare PRR to work with NewReno LossRecovery
Add proper PRR vnet declarations for consistency.
Also add pointer to tcpopt struct to tcp_do_prr_ack, in preparation
for it to deal with non-SACK window reduction (after loss).
No functional change.
MFC after: 2 weeks
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29440
(cherry picked from commit 90cca08e91f54214747af0419c988aba868398ed)
---
sys/netinet/tcp_input.c | 8 ++++----
sys/netinet/tcp_var.h | 4 +++-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 67f16b77d041..9905fc01ced8 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2576,7 +2576,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
if (V_tcp_do_prr &&
IN_FASTRECOVERY(tp->t_flags) &&
(tp->t_flags & TF_SACK_PERMIT)) {
- tcp_do_prr_ack(tp, th);
+ tcp_do_prr_ack(tp, th, &to);
} else if ((tp->t_flags & TF_SACK_PERMIT) &&
(to.to_flags & TOF_SACK) &&
IN_FASTRECOVERY(tp->t_flags)) {
@@ -2777,7 +2777,7 @@ resume_partialack:
if (V_tcp_do_prr && to.to_flags & TOF_SACK) {
tcp_timer_activate(tp, TT_REXMT, 0);
tp->t_rtttime = 0;
- tcp_do_prr_ack(tp, th);
+ tcp_do_prr_ack(tp, th, &to);
tp->t_flags |= TF_ACKNOW;
(void) tcp_output(tp);
} else
@@ -2791,7 +2791,7 @@ resume_partialack:
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);
+ tcp_do_prr_ack(tp, th, &to);
(void) tcp_output(tp);
}
} else
@@ -3918,7 +3918,7 @@ tcp_mssopt(struct in_conninfo *inc)
}
void
-tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th)
+tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to)
{
int snd_cnt = 0, limit = 0, del_data = 0, pipe = 0;
int maxseg = tcp_maxseg(tp);
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 1e1fb2eeb678..48762e231065 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -838,6 +838,8 @@ VNET_DECLARE(int, tcp_delack_enabled);
VNET_DECLARE(int, tcp_do_autorcvbuf);
VNET_DECLARE(int, tcp_do_autosndbuf);
VNET_DECLARE(int, tcp_do_ecn);
+VNET_DECLARE(int, tcp_do_prr);
+VNET_DECLARE(int, tcp_do_prr_conservative);
VNET_DECLARE(int, tcp_do_newcwv);
VNET_DECLARE(int, tcp_do_rfc1323);
VNET_DECLARE(int, tcp_tolerate_missing_ts);
@@ -1056,7 +1058,7 @@ void tcp_clean_dsack_blocks(struct tcpcb *tp);
void tcp_clean_sackreport(struct tcpcb *tp);
void tcp_sack_adjust(struct tcpcb *tp);
struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt);
-void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *);
+void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *);
void tcp_sack_partialack(struct tcpcb *, struct tcphdr *);
void tcp_free_sackholes(struct tcpcb *tp);
int tcp_newreno(struct tcpcb *, struct tcphdr *);
More information about the dev-commits-src-branches
mailing list