diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2022-05-10 13:46:05 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2022-05-10 13:46:05 +0000 |
commit | 04831efd9f6b1426c160befdc9f7e6b8e1f3e272 (patch) | |
tree | 09a8914f1456a9f85074b747507bd211d7373d57 | |
parent | bbd60e2c94dd1d4f39c38272da9086fa573cc639 (diff) | |
download | src-04831efd9f6b1426c160befdc9f7e6b8e1f3e272.tar.gz src-04831efd9f6b1426c160befdc9f7e6b8e1f3e272.zip |
tcp: Rack idle reduce not working.
Rack converted to micro-seconds quite some time ago, but in testing
we have found a miss in that work. The idle reduce time is still based
in ticks, so it must be converted to microseconds before any comparisons
else you will likely not do idle reduce.
Reviewed by: tuexen, thj
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D35066
-rw-r--r-- | sys/netinet/tcp_stacks/rack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 30a23a578dd4..cda6bd1fcf84 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -13467,7 +13467,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb /* Update the rcv time and perform idle reduction possibly */ if (tp->t_idle_reduce && (tp->snd_max == tp->snd_una) && - ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { + (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { counter_u64_add(rack_input_idle_reduces, 1); rack_cc_after_idle(rack, tp); } @@ -14232,7 +14232,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (tp->t_idle_reduce && (tp->snd_max == tp->snd_una) && - ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { + (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { counter_u64_add(rack_input_idle_reduces, 1); rack_cc_after_idle(rack, tp); } @@ -16783,7 +16783,7 @@ rack_output(struct tcpcb *tp) */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (tp->t_idle_reduce) { - if (idle && ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) + if (idle && (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) rack_cc_after_idle(rack, tp); } tp->t_flags &= ~TF_LASTIDLE; |