So it turns out with the right window scaling you can get the code in all stacks to
always want to do a window update, even when no data can be sent. Now in
cases where you are not pacing thats probably ok, you just send an extra
window update or two. However with bbr (and rack if its paced) every time
the pacer goes off its going to send a "window update".
Details
Details
- Reviewers
tuexen - Group Reviewers
transport - Commits
- rS362113: So it turns out with the right window scaling you can get the code in all…
You can use the following pkt drill script to test this with BBR and see it fixes the issue too
--ip_version=ipv4 +0.00 `sysctl -w net.inet.tcp.hostcache.purgenow=1` +0.00 `sysctl -w net.inet.tcp.syncookies_only=0` +0.00 `sysctl -w net.inet.tcp.syncookies=1` +0.00 `sysctl -w net.inet.tcp.rfc1323=1` +0.00 `sysctl -w net.inet.tcp.sack.enable=1` +0.00 `sysctl -w net.inet.tcp.ecn.enable=2` // Create a listening TCP socket +0.00 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0.00 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0.00 bind(3, ..., ...) = 0 +0.00 listen(3, 1) = 0 // Establish the connection +0.00 < S 0:0(0) win 65535 <mss 1390, sackOK, nop, nop, nop, wscale 8 > * > S. 0:0(0) ack 1 <mss 1460,nop, wscale 6,sackOK,eol,eol> +0.00 < . 1:1(0) ack 1 win 65535 +0.00 accept(3, ..., ...) = 4 +0.00 setsockopt(4, IPPROTO_TCP, TCP_NODELAY, [1], 4) = 0 +0.00 close(3) = 0 +0.00 < . 1:400(399) ack 1 win 32767 // Verify that there are no errors pending at the socket layer. +0.00 setsockopt(4, IPPROTO_TCP, TCP_FUNCTION_BLK, {function_set_name="bbr_latest", pcbcnt=0}, 36) = 0 +0.00 setsockopt(4, IPPROTO_TCP, TCP_LOG, [4], 4) = 0 +0.00 getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 // Now it is in the ESTABLISHED state. +0.00 setsockopt(4, IPPROTO_TCP, TCP_LOG, [4], 4) = 0 +0.00 write(4, ..., 3154) = 3154 +0.00 > . 1:1391(1390) ack 400 win 1037 * > . 1391:2781(1390) ack 400 win 1037 * > P. 2781:3155(374) ack 400 win 1037 +0.50 < . 400:400(0) ack 2781 win 32767 +0.10 < . 400:400(0) ack 3155 win 32767 // Tear it down. +0.00 close(4) = 0
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
tcp_stacks/bbr.c | ||
---|---|---|
8081 | I guess this change is fixing another issue? |
Comment Actions
Using the upstream variant of bbr (not "bbr_latest"), I could not recreate the reported issue (that is, the packetdrill script failing) with either bbr or the base stack...
I will have to think some how to get rcv_adv - rcv_nxt larger than recwin, to make a working check for the base stack...
Also, for some reason, rS362113 is not tied into this Diff properly (and the Diff closed automatically).
tcp_stacks/bbr.c | ||
---|---|---|
8081 | Yeah this was another bug I found in debugging. We get dropped out of STARTUP when we should not at times. |