Created attachment 201465 [details] packetdrill script to validate IW10 behavior without ABC Checking the Initial Window while disabling Appropriate Byte Counting: net.inet.tcp.rfc3465=0 net.inet.tcp.initcwnd_segments=10 Transmits 11 packets (also exceeding the hardcoded limit of 14600 octets). After a casual inspection, this may be present since BSD10 when modular congestion control moved relevant code around. Possibly this is due to the final ACK of the 3WHS getting processed normally, and without ABC checking that this is an empty ACK, immeditately increasing cwnd
D19000 should address this particular issue, plus a nuisance caused as a side effect for ABC-enabled (default) sessions.
Also, this bug seems to pre-date modular congestion control. The order of when cwnd gets set to the initial window changed well before that, and as Appropriate Byte Counting is the default for a very long time, this passed unnoticed apparently.
review D19033 fixes a bug which has as a consequence that the bug reported here only shows up on TCP connections supporting TCP window scaling.
A commit references this bug: Author: tuexen Date: Fri Feb 1 12:33:01 UTC 2019 New revision: 343661 URL: https://svnweb.freebsd.org/changeset/base/343661 Log: When handling SYN-ACK segments in the SYN-RCVD state, set tp->snd_wnd consistently. This inconsistency was observed when working on the bug reported in PR 235256, although it does not fix the reported issue. The fix for the PR will be a separate commit. PR: 235256 Reviewed by: rrs@, Richard Scheffenegger MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D19033 Changes: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/rack.c
A commit references this bug: Author: tuexen Date: Sat May 4 09:11:17 UTC 2019 New revision: 347082 URL: https://svnweb.freebsd.org/changeset/base/347082 Log: MFC r343661: When handling SYN-ACK segments in the SYN-RCVD state, set tp->snd_wnd consistently. This inconsistency was observed when working on the bug reported in PR 235256, although it does not fix the reported issue. The fix for the PR will be a separate commit. PR: 235256 Reviewed by: rrs@, Richard Scheffenegger Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D19033 Changes: _U stable/12/ stable/12/sys/netinet/tcp_input.c stable/12/sys/netinet/tcp_stacks/rack.c
Does this apply to stable/11 ?
A commit references this bug: Author: rscheff Date: Tue Apr 21 13:05:45 UTC 2020 New revision: 360143 URL: https://svnweb.freebsd.org/changeset/base/360143 Log: Correctly set up the initial TCP congestion window in all cases, by adjust snd_una right after the connection initialization, to include the one byte in sequence space occupied by the SYN bit. This does not change the regular ACK processing, while making the BYTES_THIS_ACK macro to work properly. PR: 235256 Reviewed by: tuexen (mentor), rgrimes (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D19000 Changes: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c
A commit references this bug: Author: rscheff Date: Wed Apr 29 21:48:53 UTC 2020 New revision: 360477 URL: https://svnweb.freebsd.org/changeset/base/360477 Log: Correctly set up the initial TCP congestion window in all cases, by not including the SYN bit sequence space in cwnd related calculations. Snd_und is adjusted explicitly in all cases, outside the cwnd update, instead. This fixes an off-by-one conformance issue with regular TCP sessions not using Appropriate Byte Counting (RFC3465), sending one more packet during the initial window than expected. PR: 235256 Reviewed by: tuexen (mentor), rgrimes (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D19000 Changes: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c
A commit references this bug: Author: rscheff Date: Thu May 21 19:46:12 UTC 2020 New revision: 361342 URL: https://svnweb.freebsd.org/changeset/base/361342 Log: MFC r360477: Correctly set up the initial TCP congestion window in all cases by not including the SYN bit sequence space in cwnd related calculations. Snd_und is adjusted explicitly in all cases, outside the cwnd update, instead. This fixes an off-by-one conformance issue with regular TCP sessions not using Appropriate Byte Counting (RFC3465), sending one more packet during the initial window than expected. PR: 235256 Reviewed by: tuexen (mentor), rgrimes (mentor, blanket) Approved by: tuexen (mentor), rgrimes (mentor, blanket) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D19000 Changes: _U stable/12/ stable/12/sys/netinet/tcp_input.c stable/12/sys/netinet/tcp_stacks/rack.c