p4c-xdp icon indicating copy to clipboard operation
p4c-xdp copied to clipboard

i40e xdp driver: the xdp program does not see vlan tag

Open williamtu opened this issue 8 years ago • 4 comments

when parsing the vlan header from XDP program, my xdp program does not see vlan tag, while tcpdump can see it. I suspect the i40e nic is doing hardware vlan offload so vlan header is kept in skb metadata. I tried disable the vlan offload but fails.

root@prmh-nsx-perf-server139:# ethtool -K enp66s0f0 rx-vlan-offload off
ethtool: bad command line argument(s)
For more information run ethtool -h

williamtu avatar Feb 23 '17 18:02 williamtu

Correct syntax to disable the hardware VLAN offload is ethtool -K enp66s0f0 rxvlan off.

jaelsasser avatar Jun 17 '18 20:06 jaelsasser

OH, thanks, it works!

root@osboxes:~/ovs# ethtool -K enp0s16 rxvlan off
Actual changes:
rx-vlan-offload: off
tx-vlan-offload: off [fixed]

williamtu avatar Jun 18 '18 12:06 williamtu

if vlan filter is on, it should be turn off. (if you do not turn off filter, you must add vlan interface (e.g. enp65s0f0.10) for xdp)

# ethtool -k enp65s0f0 | grep rx-vlan-filter                      
rx-vlan-filter: on

# ethtool -K enp65s0f0 rx-vlan-filter off

shogosanz avatar Feb 26 '19 02:02 shogosanz

I will reopen and keep tagged as question, so other people can see it.

mihaibudiu avatar Feb 26 '19 23:02 mihaibudiu