Page MenuHomeFreeBSD

iflib: Take iri_pad into account when processing small frames
ClosedPublic

Authored by kd on Apr 27 2021, 10:49 AM.
Tags
None
Referenced Files
F168345221: D30009.diff
Thu, Aug 27, 5:18 PM
Unknown Object (File)
Thu, Aug 27, 2:36 AM
Unknown Object (File)
Tue, Aug 25, 8:06 PM
Unknown Object (File)
Tue, Aug 25, 3:40 PM
Unknown Object (File)
Tue, Aug 25, 1:46 AM
Unknown Object (File)
Mon, Aug 24, 11:41 PM
Unknown Object (File)
Sun, Aug 23, 8:32 AM
Unknown Object (File)
Sat, Aug 22, 9:29 PM
Subscribers

Details

Summary

Drivers can specify padding of received frames with iri_pad field.
This can be used to enforce ip alignment by hardware.
Iflib ignores that padding when processing small frames, which renders this feature inoperable.
I found it while writing a driver for a NIC that can ip align received packets.
Note that this doesn't change behavior of existing drivers as they all set iri_pad to 0.

Diff Detail

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