Page MenuHomeFreeBSD

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

Authored by rscheff on Jun 10 2022, 4:08 PM.
Tags
None
Referenced Files
F77794044: D35446.id106838.diff
Fri, Feb 23, 4:53 PM
F77751592: D35446.diff
Fri, Feb 23, 12:08 AM
Unknown Object (File)
Thu, Feb 15, 4:22 AM
Unknown Object (File)
Fri, Feb 2, 1:54 AM
Unknown Object (File)
Dec 23 2023, 2:40 PM
Unknown Object (File)
Dec 22 2023, 11:51 AM
Unknown Object (File)
Dec 12 2023, 3:12 AM
Unknown Object (File)
Dec 10 2023, 11:32 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 Passed
Unit
No 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
1574

Please declare so at the beginning of a block.

1577

Use top + 1 instead of top+1.

1659

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–988

Why do you start a block here?

988

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

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

The combination of D36626, D36631 and D36637 addressed the root cause (and incidential, connected issues). This symptomatic fix is not needed.