svn commit: r360798 - head/sys/netinet/tcp_stacks
Randall Stewart
rrs at FreeBSD.org
Thu May 7 20:29:39 UTC 2020
Author: rrs
Date: Thu May 7 20:29:38 2020
New Revision: 360798
URL: https://svnweb.freebsd.org/changeset/base/360798
Log:
When in the SYN-SENT state bbr and rack will not properly send an ACK but instead start the D-ACK timer. This
causes so_reuseport_lb_test to fail since it slows down how quickly the program runs until the timeout occurs
and fails the test
Sponsored by: Netflix inc.
Differential Revision: https://reviews.freebsd.org/D24747
Modified:
head/sys/netinet/tcp_stacks/bbr.c
head/sys/netinet/tcp_stacks/rack.c
Modified: head/sys/netinet/tcp_stacks/bbr.c
==============================================================================
--- head/sys/netinet/tcp_stacks/bbr.c Thu May 7 20:27:32 2020 (r360797)
+++ head/sys/netinet/tcp_stacks/bbr.c Thu May 7 20:29:38 2020 (r360798)
@@ -4078,6 +4078,7 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, u
*/
#define DELAY_ACK(tp, bbr, nsegs) \
(((tp->t_flags & TF_RXWIN0SENT) == 0) && \
+ ((tp->t_flags & TF_DELACK) == 0) && \
((bbr->bbr_segs_rcvd + nsegs) < tp->t_delayed_ack) && \
(tp->t_delayed_ack || (tp->t_flags & TF_NEEDSYN)))
@@ -8992,7 +8993,7 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, str
* If there's data, delay ACK; if there's also a FIN ACKNOW
* will be turned on later.
*/
- if (DELAY_ACK(tp, bbr, 1) && tlen != 0 && (tfo_partial == 0)) {
+ if (DELAY_ACK(tp, bbr, 1) && tlen != 0 && !tfo_partial) {
bbr->bbr_segs_rcvd += 1;
tp->t_flags |= TF_DELACK;
bbr_timer_cancel(bbr, __LINE__, bbr->r_ctl.rc_rcvtime);
Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c Thu May 7 20:27:32 2020 (r360797)
+++ head/sys/netinet/tcp_stacks/rack.c Thu May 7 20:29:38 2020 (r360798)
@@ -9320,7 +9320,15 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, st
* If there's data, delay ACK; if there's also a FIN ACKNOW
* will be turned on later.
*/
- rack_handle_delayed_ack(tp, rack, tlen, tfo_partial);
+ if (DELAY_ACK(tp, tlen) && tlen != 0 && !tfo_partial) {
+ rack_timer_cancel(tp, rack,
+ rack->r_ctl.rc_rcvtime, __LINE__);
+ tp->t_flags |= TF_DELACK;
+ } else {
+ rack->r_wanted_output = 1;
+ tp->t_flags |= TF_ACKNOW;
+ rack->rc_dack_toggle = 0;
+ }
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
(V_tcp_do_ecn == 1)) {
tp->t_flags2 |= TF2_ECN_PERMIT;
More information about the svn-src-all
mailing list