Page MenuHomeFreeBSD

tcp: clear SACK state when scoreboard is forcefully freed
ClosedPublic

Authored by rscheff on Oct 11 2023, 8:02 PM.
Tags
None
Referenced Files
F174663475: D42162.id.diff
Mon, Oct 5, 1:18 AM
F174629116: D42162.diff
Sun, Oct 4, 7:12 PM
Unknown Object (File)
Sun, Oct 4, 4:24 AM
Unknown Object (File)
Sun, Oct 4, 2:26 AM
Unknown Object (File)
Tue, Sep 29, 5:50 PM
Unknown Object (File)
Tue, Sep 29, 5:46 PM
Unknown Object (File)
Fri, Sep 25, 4:49 AM
Unknown Object (File)
Wed, Sep 16, 7:38 AM
Subscribers

Details

Summary

When a RTO happens during an on-going SACK loss recovery
episode, the internal summary accounting is not cleared.
This may lead to subsequent errors in calculations
(e.g. IsLost()).

PR: 274406
Reported by: pho

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 53931
Build 50821: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 11 2023, 8:06 PM
sys/netinet/tcp_sack.c
891

Better keep the fields in order like in the struct sackhint definition.

tp->sackhint.delivered_data = 0;
tp->sackhint.sacked_bytes = 0;
tp->sackhint.hole_bytes = 0;
tp->sackhint.lost_bytes = 0;

This change fixes the panic I saw.

rscheff edited the test plan for this revision. (Show Details)
rscheff added inline comments.
sys/netinet/tcp_sack.c
891

I trust gcc to do simple reorders like this for more effective data access. Already committed to fix an ongoing panic.