82599 receiving packets with vlan tag=0 (vlan strip problem)?

Corey Smith corsmith at gmail.com
Tue Dec 20 17:53:09 UTC 2011


This is an old thread from 2010 but I am running into the same issue
while using an Intel 2 x 10Gbps 82599 card.

Using other 10Gbps Intel cards based on other chipsets I have been
able to setup a monitor bridge to aggregate all traffic into a single
feed.  When setting up a bridge in monitor mode using these cards
every packet has two 802.1Q vlan tags.  The first tag is always vlan
0.  The second tag is the actual valid vlan id.  Example:

tcpdump -i bridge0 -n -c 1 -e
12:15:01.345246 00:14:4f:00:00:00 > 00:01:d7:00:00:00, ethertype
802.1Q (0x8100), length 494: vlan 0, p 0, ethertype 802.1Q, vlan 21, p
0, ethertype IPv4, 192.168.1.69.10001 > 192.168.1.61.54027: P
3519256927:3519257359(432) ack 646682744 win 49640

uname -a:

# also tested in 7.3 and 9.0-RC3
FreeBSD ids 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27
18:45:57 UTC 2011
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

/etc/rc.conf:

cloned_interfaces="bridge0"
ifconfig_ix0="mtu 9216 up"
ifconfig_ix1="mtu 9216 up"
ifconfig_ix2="mtu 9216 up"
ifconfig_ix3="mtu 9216 up"
ifconfig_bridge0="addm ix0 addm ix1 addm ix2 addm ix3 monitor up"

pciconf -l:

ix0 at pci0:10:0:0:	class=0x020000 card=0x00038086 chip=0x10fb8086
rev=0x01 hdr=0x00

The work around is to put at least a single dummy vlan sub interface
associated with each physical interface.

Add this to /etc/rc.conf:
cloned_interfaces="bridge0 vlan4080 vlan4081 vlan4082 vlan4083"
ifconfig_vlan4080="vlan 4080 vlandev ix0"
ifconfig_vlan4081="vlan 4081 vlandev ix1"
ifconfig_vlan4082="vlan 4082 vlandev ix2"
ifconfig_vlan4083="vlan 4083 vlandev ix3"

Apparently this enables vlan processing in the driver and packets are
properly vlan tagged.  Example output with the work around in place:

tcpdump -i bridge0 -n -c 1 -e
12:20:10.830955 00:22:19:00:00:01 > 00:00:0c:00:00:01, ethertype
802.1Q (0x8100), length 914: vlan 28, p 0, ethertype IPv4,
192.168.1.140.1194 > 192.168.10.140.1194: UDP, length 868

Every other driver seems to properly process vlan tags without having
to create vlan sub interfaces.  Any ideas on how to make vlan tag
processing the default behavior on this hardware?

-Corey Smith


More information about the freebsd-net mailing list