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
Unknown Object (File)
Sun, Apr 6, 7:47 AM
Unknown Object (File)
Fri, Apr 4, 11:12 PM
Unknown Object (File)
Thu, Apr 3, 10:01 AM
Unknown Object (File)
Thu, Mar 20, 10:04 PM
Unknown Object (File)
Feb 25 2025, 2:59 AM
Unknown Object (File)
Feb 22 2025, 12:00 AM
Unknown Object (File)
Feb 20 2025, 11:43 PM
Unknown Object (File)
Jan 25 2025, 11:30 AM
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