svn commit: r362234 - head/sys/netinet/tcp_stacks
Randall Stewart
rrs at FreeBSD.org
Tue Jun 16 18:16:46 UTC 2020
Author: rrs
Date: Tue Jun 16 18:16:45 2020
New Revision: 362234
URL: https://svnweb.freebsd.org/changeset/base/362234
Log:
iSo in doing final checks on OCA firmware with all the latest tweaks the dup-ack checking
packet drill script was failing with a number of unexpected acks. So it turns
out if you have the default recvwin set up to 1Meg (like OCA's do) and you
have no window scaling (like the dupack checking code) then we have another
case where we are always trying to update the rwnd and sending an
ack when we should not.
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D25298
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 Tue Jun 16 17:45:23 2020 (r362233)
+++ head/sys/netinet/tcp_stacks/bbr.c Tue Jun 16 18:16:45 2020 (r362234)
@@ -12157,8 +12157,8 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeva
* have gotten more data into the socket buffer to
* send.
*/
- recwin = min(max(sbspace(&so->so_rcv), 0),
- TCP_MAXWIN << tp->rcv_scale);
+ recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
+ (long)TCP_MAXWIN << tp->rcv_scale);
if ((bbr_window_update_needed(tp, so, recwin, maxseg) == 0) &&
((tcp_outflags[tp->t_state] & TH_RST) == 0) &&
((sbavail(sb) + ((tcp_outflags[tp->t_state] & TH_FIN) ? 1 : 0)) <=
@@ -12839,8 +12839,8 @@ recheck_resend:
ipoptlen == 0)
tso = 1;
- recwin = min(max(sbspace(&so->so_rcv), 0),
- TCP_MAXWIN << tp->rcv_scale);
+ recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
+ (long)TCP_MAXWIN << tp->rcv_scale);
/*
* Sender silly window avoidance. We transmit under the following
* conditions when len is non-zero:
Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c Tue Jun 16 17:45:23 2020 (r362233)
+++ head/sys/netinet/tcp_stacks/rack.c Tue Jun 16 18:16:45 2020 (r362234)
@@ -12750,7 +12750,8 @@ again:
flags &= ~TH_FIN;
}
}
- recwin = sbspace(&so->so_rcv);
+ recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
+ (long)TCP_MAXWIN << tp->rcv_scale);
/*
* Sender silly window avoidance. We transmit under the following
@@ -13656,8 +13657,6 @@ send:
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) &&
recwin < (long)(tp->rcv_adv - tp->rcv_nxt))
recwin = (long)(tp->rcv_adv - tp->rcv_nxt);
- if (recwin > (long)TCP_MAXWIN << tp->rcv_scale)
- recwin = (long)TCP_MAXWIN << tp->rcv_scale;
}
/*
More information about the svn-src-head
mailing list