]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ixgbe: fix software vlan handling
authorKristof Provost <kp@FreeBSD.org>
Thu, 11 Aug 2022 12:45:01 +0000 (14:45 +0200)
committerKristof Provost <kp@FreeBSD.org>
Wed, 17 Aug 2022 14:39:18 +0000 (16:39 +0200)
commite7abb897018be34f039ad957562fdc2f38aa3562
tree7c24dbfd789df4b386ba137164eb628a86363fb1
parent9ac6eda6c6a36db6bffa01be7faea24f8bb92a0f
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
sys/dev/ixgbe/if_ix.c