Page MenuHomeFreeBSD

tcp: Check if we exceed socket send buffer instead of snd_fack
Needs ReviewPublic

Authored by rscheff on Jun 10 2022, 4:08 PM.

Details

Reviewers
tuexen
Group Reviewers
transport
Summary

SACK rescue retransmission is supposed to be inserted never
exceeding the right edge of the socket sendbuffer. However,
rarely there appear to be instances, when either the rescue
retransmission is created using an incorrect offset (FIN bit?),
or the send buffer retracts (?). In this case, panic an INVARIANTS
kernel as early as possible to track why this may be happening,
or skip over SACK retransmission processing altogether and revert
to NewReno loss recovery from snd_una.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 46194
Build 43083: arc lint + arc unit

Event Timeline

  • verify the creation of the rescue retransmission hole in the scoreboard
  • make sure that snd_max is never more than 1 beyond so_snd
  • make snd_max sane in non INVARIANTS build while warning
sys/netinet/tcp_output.c
1573

Please declare so at the beginning of a block.

1576

Use top + 1 instead of top+1.

1658

Please declare so at the beginning of a block.

sys/netinet/tcp_sack.c
903–915

Please declare so at the beginning of a block.

987

Please declare so at the beginning of a block; assuming you remove the start of the current block.

987–988

Why do you start a block here?

rscheff marked 6 inline comments as done.
  • align code with style rules

thanks for the feedback, addressed the comments.

  • revive D2970 - adjust snd_nxt properly if FIN packet fails to be sent
  • add logging, when D2970 fix activates - to check incidence rate