Skip to contentSkip to conversation

Intel X520 looses ethtool flow-type rule the moment a BPF / XDP program is loaded

DISCUSSION Gaul, Maximilian 2 participants 6 messages Jun 5, 2020

lore
Share & tools
lore
#0 lore raw

Hello,

I have an Intel X520 10Gbit/s NIC with driver:

		$ sudo ethtool -i eth5
		driver: ixgbe
		version: 5.7.1
		firmware-version: 0x80000827, 16.5.19
		expansion-rom-version: 
		bus-info: 0000:04:00.1
		supports-statistics: yes
		supports-test: yes
		supports-eeprom-access: yes
		supports-register-dump: yes
		supports-priv-flags: yes

and Kernel:

		$ uname -a
		Linux 5.6.0-2-amd64

I tried this tutorial before hand: https://software.intel.com/content/www/us/en/develop/articles/setting-up-intel-ethernet-flow-director.html

Unfortunately I am experiencing some strange behavior in combination with AF_XDP.

For example, I am adding an ethtool flow-type rule like this:

		$ sudo ethtool -N eth5 flow-type udp4 dst-ip 239.0.1.1 dst-port 5500 action 0
		Added rule with ID 4093

Checking it is there:

		$ sudo ethtool -n eth5
		16 RX rings available
		Total 1 rules
		Filter: 4093
				Rule Type: UDP over IPv4
				Src IP addr: 0.0.0.0 mask: 255.255.255.255
				Dest IP addr: 239.0.1.1 mask: 0.0.0.0
				TOS: 0x0 mask: 0xff
				Src port: 0 mask: 0xffff
				Dest port: 5500 mask: 0x0
				VLAN EtherType: 0x0 mask: 0xffff
				VLAN: 0x0 mask: 0xffff
				User-defined: 0x0 mask: 0xffffffffffffffff
				Action: Direct to queue 0

After that I am launching my AF_XDP program which firsts loads a compiled BPF-object file into the kernel (without any errors). I am checking ethtool again:

		$ sudo ethtool -n eth5
		16 RX rings available
		Total 0 rules

Any ideas why that is? I am not saying that my program is bug-free but it worked fine in combination with Mellannox ConnectX5 and Broadcom 1Gbit/s NIC (without zcopy on the broadcom though).

Thank you

Max

#1 lore raw
Quoted 49 lines · Maximilian

Hello,

I have an Intel X520 10Gbit/s NIC with driver:

                $ sudo ethtool -i eth5
                driver: ixgbe
                version: 5.7.1
                firmware-version: 0x80000827, 16.5.19
                expansion-rom-version:
                bus-info: 0000:04:00.1
                supports-statistics: yes
                supports-test: yes
                supports-eeprom-access: yes
                supports-register-dump: yes
                supports-priv-flags: yes

and Kernel:

                $ uname -a
                Linux 5.6.0-2-amd64

I tried this tutorial before hand: https://software.intel.com/content/www/us/en/develop/articles/setting-up-intel-ethernet-flow-director.html

Unfortunately I am experiencing some strange behavior in combination with AF_XDP.

For example, I am adding an ethtool flow-type rule like this:

                $ sudo ethtool -N eth5 flow-type udp4 dst-ip 239.0.1.1 dst-port 5500 action 0
                Added rule with ID 4093

Checking it is there:

                $ sudo ethtool -n eth5
                16 RX rings available
                Total 1 rules
                Filter: 4093
                                Rule Type: UDP over IPv4
                                Src IP addr: 0.0.0.0 mask: 255.255.255.255
                                Dest IP addr: 239.0.1.1 mask: 0.0.0.0
                                TOS: 0x0 mask: 0xff
                                Src port: 0 mask: 0xffff
                                Dest port: 5500 mask: 0x0
                                VLAN EtherType: 0x0 mask: 0xffff
                                VLAN: 0x0 mask: 0xffff
                                User-defined: 0x0 mask: 0xffffffffffffffff
                                Action: Direct to queue 0
Quoted 8 lines

After that I am launching my AF_XDP program which firsts loads a compiled BPF-object file into the kernel (without any errors). I am checking ethtool again:

                $ sudo ethtool -n eth5
                16 RX rings available
                Total 0 rules

Any ideas why that is? I am not saying that my program is bug-free but it worked fine in combination with Mellannox ConnectX5 and Broadcom 1Gbit/s NIC (without zcopy on the broadcom though).

Max,

This is unfortunately a known issue with this older NIC. The newer Intel NICs such as i40e (Fortville) and ice (Columbiaville) work as you would expect. They do remember filter settings after enabling XDP.

/Magnus

Quoted 3 lines

Thank you

Max

#2 lore raw
Quoted 8 lines

Max,

This is unfortunately a known issue with this older NIC. The newer Intel NICs such as i40e (Fortville) and ice (Columbiaville) work as you would expect. They do remember filter settings after enabling XDP.

/Magnus

Thank you for your reply Magnus.

That is unfortunate but looks like I am not able to change anything about it.

Do you know if there are other problems with AF_XDP and that NIC?

For example, I am adding a multicast address membership to a generic Linux socket and then loading a BPF / XDP program.

After loading the BPF program I no longer receive any packets (tcpdump -i eth5).

Thank you

Max

#3 lore raw
Quoted 12 lines · Maximilian
Quoted 9 lines

Max,

This is unfortunately a known issue with this older NIC. The newer Intel NICs such as i40e (Fortville) and ice (Columbiaville) work as you would expect. They do remember filter settings after enabling XDP.

/Magnus

Thank you for your reply Magnus.

Quoted 7 lines

That is unfortunate but looks like I am not able to change anything about it.

Do you know if there are other problems with AF_XDP and that NIC?

For example, I am adding a multicast address membership to a generic Linux socket and then loading a BPF / XDP program.

After loading the BPF program I no longer receive any packets (tcpdump -i eth5).

I do not use this card in my AF_XDP lab setup, so unforuately I do not know. I have included some persons from the networking division at Intel. They might know of a "known issues" page or somewhere where you can bug report this.

/Magnus

Quoted 3 lines

Thank you

Max

#4 lore raw
Quoted 6 lines

I do not use this card in my AF_XDP lab setup, so unforuately I do not know. I have included some persons from the networking division at Intel. They might know of a "known issues" page or somewhere where you can bug report this.

/Magnus

Thank you so much!

One more question: Does the 82599ES 10Gbit/s NIC have similiar issues with XDP and ethtool?

Best regards

Max

#5 lore raw
Quoted 11 lines · Maximilian
Quoted 7 lines

I do not use this card in my AF_XDP lab setup, so unforuately I do not know. I have included some persons from the networking division at Intel. They might know of a "known issues" page or somewhere where you can bug report this.

/Magnus

Thank you so much!

One more question: Does the 82599ES 10Gbit/s NIC have similiar issues with XDP and ethtool?

I believe that is a Niantic card too, so yes it will have at least have the XDP issue.

/Magnus

Quoted 3 lines

Best regards

Max