HomeFreeBSD

LRO: fix BPF filters for lagg in the hpts path

Description

LRO: fix BPF filters for lagg in the hpts path

When in the hpts path, we need to handle BPF filters since aggregated
packets do not pass up the stack in the normal way. This is already
done for most interfaces, but lagg needs special handling. This is
because packets received via a lagg are passed up the stack with
the leaf interface's ifp stored in m_pkthdr.rcvif.

To handle lagg packets, we must identify that the passed rcvif is
currently a lagg port by checking for IFT_IEEE8023ADLAG or
IFT_INFINIBANDLAG (since lagg changes the lagg port's type to that
when an interface becomes a lagg member). Then we need to find the
lagg's ifp, and handle any BPF listeners on the lagg.

Note: It is possible to have multiple BPF filters, one on a member
port and one on the lagg itself. That is why we have to have 2
checks and 2 ETHER_BPF_MTAPs.

Reviewed by: jhb, rrs
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36136

Details

Provenance
gallatinAuthored on Aug 13 2022, 12:15 AM
Reviewer
jhb
Differential Revision
D36136: LRO: fix BPF filters for lagg ports in the hpts path
Parents
rG0f6a767c02ac: Replace a dead cross reference with the proper (I think) macro.
Branches
Unknown
Tags
Unknown