Page MenuHomeFreeBSD

libsa: ip fragment reassembly is buggy
ClosedPublic

Authored by tsoome on Aug 1 2025, 9:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 4:18 PM
Unknown Object (File)
Fri, Oct 10, 4:17 PM
Unknown Object (File)
Fri, Oct 10, 4:17 PM
Unknown Object (File)
Fri, Oct 10, 4:17 PM
Unknown Object (File)
Fri, Oct 10, 4:17 PM
Unknown Object (File)
Fri, Oct 10, 10:28 AM
Unknown Object (File)
Fri, Oct 3, 7:43 AM
Unknown Object (File)
Mon, Sep 29, 2:38 PM
Subscribers

Details

Summary

Well, it does not really work and we are getting retransmits.
To replicate, set nfs.read_size large enough.

What needs to happen is, we read ethernet packet, if it has
IPv4 payload and that payload is fragment, we create reassembly
queue (sorted by growing fragment offset) and on last
fragment, we can build complete packet. Once done properly,
the network load can utilize larger read sizes.

While there, move ARP (and other) processing out of readipv4().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tsoome requested review of this revision.Aug 1 2025, 9:20 PM

The reassembly code looks good. We have a new debug print thing you might want to use...

This revision is now accepted and ready to land.Aug 2 2025, 6:20 PM
This revision now requires review to proceed.Aug 5 2025, 9:39 AM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 8 2025, 7:13 AM
This revision was automatically updated to reflect the committed changes.