diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2020-05-15 14:00:12 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2020-05-15 14:00:12 +0000 |
commit | 777b88d60f5911e6e87c134c6d1a21cbae047d7f (patch) | |
tree | a47ee73f4b088acf9fa18ee1858b89d644058ed0 /sys/netinet/tcp_stacks/rack.c | |
parent | a2b127ae7baf2baa0eed6cacd456a71d9835fa20 (diff) | |
download | src-777b88d60f5911e6e87c134c6d1a21cbae047d7f.tar.gz src-777b88d60f5911e6e87c134c6d1a21cbae047d7f.zip |
This fixes several skyzaller issues found with the
help of Michael Tuexen. There was some accounting
errors with TCPFO for bbr and also for both rack
and bbr there was a FO case where we should be
jumping to the just_return_nolock label to
exit instead of returning 0. This of course
caused no timer to be running and thus the
stuck sessions.
Reported by: Michael Tuexen and Skyzaller
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D24852
Notes
Notes:
svn path=/head/; revision=361080
Diffstat (limited to 'sys/netinet/tcp_stacks/rack.c')
-rw-r--r-- | sys/netinet/tcp_stacks/rack.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c6219c7cb5ca..2e6e55468ca8 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -3873,6 +3873,7 @@ skip_measurement: * the next send will trigger us picking up the missing data. */ if (rack->r_ctl.rc_first_appl && + TCPS_HAVEESTABLISHED(tp->t_state) && rack->r_ctl.rc_app_limited_cnt && (SEQ_GT(rack->r_ctl.rc_first_appl->r_start, th_ack)) && ((rack->r_ctl.rc_first_appl->r_start - th_ack) > @@ -11741,6 +11742,13 @@ rack_start_gp_measurement(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendmap *my_rsm = NULL; struct rack_sendmap fe; + if (tp->t_state < TCPS_ESTABLISHED) { + /* + * We don't start any measurements if we are + * not at least established. + */ + return; + } tp->t_flags |= TF_GPUTINPROG; rack->r_ctl.rc_gp_lowrtt = 0xffffffff; rack->r_ctl.rc_gp_high_rwnd = rack->rc_tp->snd_wnd; @@ -12109,8 +12117,10 @@ rack_output(struct tcpcb *tp) ((tp->t_state == TCPS_SYN_RECEIVED) || (tp->t_state == TCPS_SYN_SENT)) && SEQ_GT(tp->snd_max, tp->snd_una) && /* initial SYN or SYN|ACK sent */ - (tp->t_rxtshift == 0)) /* not a retransmit */ - return (0); + (tp->t_rxtshift == 0)) { /* not a retransmit */ + cwnd_to_use = rack->r_ctl.cwnd_to_use = tp->snd_cwnd; + goto just_return_nolock; + } /* * Determine length of data that should be transmitted, and flags * that will be used. If there is some data or critical controls |