Improve the TCP SACK generation by reporting DSACKs
Receiver side DSACK implemenation.
This adds initial support for RFC 2883.
Don't use C++ style comments.
This is the second in a number of patches needed to
get BBRv1 into the tree. This fixes the DSACK bug but
is also needed by BBR. We have yet to go two more
one will be for the pacing code (tcp_ratelimit.c) and
the second will be for the new updated LRO code that
allows a transport to know the arrival times of packets
and (tcp_lro.c). After that we should finally be able
to get BBRv1 into head.
This patch improves the DSACK handling to conform with RFC 2883.
The lowest SACK block is used when multiple Blocks would be elegible as
DSACK blocks ACK blocks get reordered - while maintaining the ordering of
SACK blocks not relevant in the DSACK context is maintained.
Fix the SACK block generation in the base TCP stack by bringing it in
sync with the RACK stack.
Only update SACK/DSACK lists when a non-empty segment was received.
This fixes hitting a KASSERT with a valid packet exchange.
Don't write to memory outside of the allocated array for SACK blocks.
Remove debug code not needed anymore.
The server side of TCP fast open relies on the delayed ACK timer to allow
including user data in the SYN-ACK. When DSACK support was added in
r347382, an immediate ACK was sent even for the received SYN with
user data. This patch fixes that and allows again to send user data with
This is joint work of rrs, rscheff, and tuexen.
Differential Revision: https://reviews.freebsd.org/D19334
Differential Revision: https://reviews.freebsd.org/D20908
Differential Revision: https://reviews.freebsd.org/D21038
Differential Revision: https://reviews.freebsd.org/D21513
Differential Revision: https://reviews.freebsd.org/D21567
Differential Revision: https://reviews.freebsd.org/D23208
Differential Revision: https://reviews.freebsd.org/D23212