HomeFreeBSD

iflib: Take iri_pad into account when processing small frames

Description

iflib: Take iri_pad into account when processing small frames

Drivers can specify padding of received frames with iri_pad field.
This can be used to enforce ip alignment by hardware.
Iflib ignored that padding when processing small frames,
which rendered 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.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: gallatin
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30009

Details

Provenance
mwAuthored on Apr 27 2021, 9:00 AM
Reviewer
gallatin
Differential Revision
D30009: iflib: Take iri_pad into account when processing small frames
Parents
rGeb79855920ff: sctp: fix SCTP_PEER_ADDR_PARAMS socket option
Branches
Unknown
Tags
Unknown