git: bd4f986644b3 - main - tcp: remove unused t_rttbest
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Nov 2022 10:24:36 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bd4f986644b3804e19b92d39f1f90ffabff83e14 commit bd4f986644b3804e19b92d39f1f90ffabff83e14 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2022-11-16 10:22:13 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2022-11-16 10:22:13 +0000 tcp: remove unused t_rttbest No functional change intended. Reviewed by: rscheff@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D37401 --- 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 301c2837fc0c..e4f2663cafdc 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -377,7 +377,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; @@ -3634,8 +3633,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. @@ -3644,7 +3641,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 c59e64fbf5ed..250418d87150 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -6384,8 +6384,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 @@ -6394,7 +6392,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 2aff74362c10..7105ce8bab83 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -7711,8 +7711,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 @@ -7721,7 +7719,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 7837a28f90b5..4ac563d1fc8e 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -3131,9 +3131,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 3cfbad75085d..46670a04e42c 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -213,8 +213,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 */