git: 90cca08e91f5 - main - tcp: Prepare PRR to work with NewReno LossRecovery
Richard Scheffenegger
rscheff at FreeBSD.org
Thu Apr 8 17:17:06 UTC 2021
The branch main has been updated by rscheff:
URL: https://cgit.FreeBSD.org/src/commit/?id=90cca08e91f54214747af0419c988aba868398ed
commit 90cca08e91f54214747af0419c988aba868398ed
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-08 17:16:31 +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
---
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 57779de1759a..e53296670a0f 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
@@ -3920,7 +3920,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 aefec69063e6..48e4c5c8e89a 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);
@@ -1063,7 +1065,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-main
mailing list