vmware-archive / p4c-xdp

Backend for the P4 compiler targeting XDP
Apache License 2.0
171 stars 26 forks source link

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

Open williamtu opened 7 years ago

williamtu commented 7 years ago

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
jaelsasser commented 6 years ago

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

williamtu commented 6 years ago

OH, thanks, it works!

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

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
mihaibudiu commented 5 years ago

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