git: e97522a1b7ea - stable/13 - tcp: remove unused t_rttbest
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Feb 2023 00:03:30 UTC
The branch stable/13 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=e97522a1b7ea023961d604221eb38960fd170fa9
commit e97522a1b7ea023961d604221eb38960fd170fa9
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2022-11-16 10:22:13 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-02-02 00:02:30 +0000
tcp: remove unused t_rttbest
No functional change intended.
Reviewed by: rscheff@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D37401
(cherry picked from commit bd4f986644b3804e19b92d39f1f90ffabff83e14)
---
sys/netinet/tcp_input.c | 4 ----
sys/netinet/tcp_stacks/bbr.c | 3 ---
sys/netinet/tcp_stacks/rack.c | 3 ---
sys/netinet/tcp_usrreq.c | 5 ++---
sys/netinet/tcp_var.h | 2 --
5 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 94e9d0b71cb8..1c2fe014c7f3 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -410,7 +410,6 @@ cc_conn_init(struct tcpcb *tp)
if (tp->t_srtt == 0 && (rtt = metrics.rmx_rtt)) {
tp->t_srtt = rtt;
- tp->t_rttbest = tp->t_srtt + TCP_RTT_SCALE;
TCPSTAT_INC(tcps_usedrtt);
if (metrics.rmx_rttvar) {
tp->t_rttvar = metrics.rmx_rttvar;
@@ -3642,8 +3641,6 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt)
delta -= tp->t_rttvar >> (TCP_RTTVAR_SHIFT - TCP_DELTA_SHIFT);
if ((tp->t_rttvar += delta) <= 0)
tp->t_rttvar = 1;
- if (tp->t_rttbest > tp->t_srtt + tp->t_rttvar)
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
} else {
/*
* No rtt measurement yet - use the unsmoothed rtt.
@@ -3652,7 +3649,6 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt)
*/
tp->t_srtt = rtt << TCP_RTT_SHIFT;
tp->t_rttvar = rtt << (TCP_RTTVAR_SHIFT - 1);
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
}
tp->t_rtttime = 0;
tp->t_rxtshift = 0;
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 42c66ac57891..1b4abfb6f5c4 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -6395,8 +6395,6 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts)
tp->t_rttvar += delta;
if (tp->t_rttvar <= 0)
tp->t_rttvar = 1;
- if (tp->t_rttbest > tp->t_srtt + tp->t_rttvar)
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
} else {
/*
* No rtt measurement yet - use the unsmoothed rtt. Set the
@@ -6405,7 +6403,6 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts)
*/
tp->t_srtt = rtt_ticks << TCP_RTT_SHIFT;
tp->t_rttvar = rtt_ticks << (TCP_RTTVAR_SHIFT - 1);
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
}
KMOD_TCPSTAT_INC(tcps_rttupdated);
tp->t_rttupdated++;
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 162b1c928ef7..ead81528ace5 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -7737,8 +7737,6 @@ tcp_rack_xmit_timer_commit(struct tcp_rack *rack, struct tcpcb *tp)
tp->t_rttvar += (delta >> 3);
if (tp->t_rttvar <= 0)
tp->t_rttvar = 1;
- if (tp->t_rttbest > tp->t_srtt + tp->t_rttvar)
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
} else {
/*
* No rtt measurement yet - use the unsmoothed rtt. Set the
@@ -7747,7 +7745,6 @@ tcp_rack_xmit_timer_commit(struct tcp_rack *rack, struct tcpcb *tp)
*/
tp->t_srtt = rtt;
tp->t_rttvar = rtt >> 1;
- tp->t_rttbest = tp->t_srtt + tp->t_rttvar;
}
rack->rc_srtt_measure_made = 1;
KMOD_TCPSTAT_INC(tcps_rttupdated);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 74bf2925870f..0706e55f439b 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -2919,9 +2919,8 @@ db_print_tcpcb(struct tcpcb *tp, const char *name, int indent)
tp->t_rxtcur, tp->t_maxseg, tp->t_srtt);
db_print_indent(indent);
- db_printf("t_rttvar: %d t_rxtshift: %d t_rttmin: %u "
- "t_rttbest: %u\n", tp->t_rttvar, tp->t_rxtshift, tp->t_rttmin,
- tp->t_rttbest);
+ db_printf("t_rttvar: %d t_rxtshift: %d t_rttmin: %u\n",
+ tp->t_rttvar, tp->t_rxtshift, tp->t_rttmin);
db_print_indent(indent);
db_printf("t_rttupdated: %lu max_sndwnd: %u t_softerror: %d\n",
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 4a05f0f5ab2e..2474f3787903 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -212,8 +212,6 @@ struct tcpcb {
int t_blackhole_exit; /* when to exit blackhole detection */
u_int t_rttmin; /* minimum rtt allowed */
- u_int t_rttbest; /* best rtt we've seen */
-
int t_softerror; /* possible error not yet reported */
uint32_t max_sndwnd; /* largest window peer has offered */
/* Cache line 5 */