HomeFreeBSD

ixgbe: fix software vlan handling

Description

ixgbe: fix software vlan handling

If hardware vlan tagging is disabled (after a vlan has been added) we
receive double-tagged packets, even if the packet on the wire only has a

single VLAN tag. That looks like this:

17:29:30.370787 00:51:82:11:22:02 > 90:ec:77:1f:8a:5f, ethertype 802.1Q (0x8100), length 64: vlan 0, p 0, ethertype 802.1Q, vlan 1001, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.101.0.12 is-at 00:51:82:11:22:02, length 42

This happens because the ixgbe driver does not clear the vlan flags in
the hardware (such as IXGBE_RXDCTL_VME) if IFCAP_VLAN_HWTAGGING is
cleared.

Add code to do so, which fixes this issue.

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36139

Details

Provenance
kpAuthored on Aug 11 2022, 12:45 PM
Differential Revision
D36139: ixgbe: fix software vlan handling
Parents
rG9ac6eda6c6a3: pipe: try to skip locking the pipe if a non-blocking fd is used
Branches
Unknown
Tags
Unknown