NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.1k forks source link

openvswitch-dpdk add mellanox cx6-lx switchdev port failed #344769

Open lzslab opened 1 month ago

lzslab commented 1 month ago

Describe the bug

Can't add port after change cx6-lx port to switchdev mode. Legacy mode is fine. dpdk-testpmd nothing wrong

Steps to reproduce the behavior:

  1. inbox mlx5_core/unstable.openvswitch-dpdk/setup hugepages
  2. devlink dev eswitch set pci/0000:01:00.0 mode switchdev
  3. ovs-vsctl add-port vSwitch0 pf -- set Interface pf type=dpdk options:dpdk-devargs=0000:01:00.0,dv_flow_en=2,dv_esw_en=1,dv_xmeta_en=0

Expected behavior

add switchdev port successfully.

Additional context

9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00143|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 18, max sleep:    0 us.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00144|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 18 created.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00145|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 19, max sleep:    0 us.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00146|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 19 created.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00147|dpif_netdev|INFO|There are 2 pmd threads on numa node 0
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00148|dpdk|INFO|Device with port_id=0 already stopped
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00001|dpdk(pmd-c18/id:15)|INFO|PMD thread uses DPDK lcore 0.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00001|dpdk(pmd-c19/id:16)|INFO|PMD thread uses DPDK lcore 1.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00149|dpdk|ERR|mlx5_common: Failed to query event queue number.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00150|dpdk|ERR|mlx5_net: Port 0 Tx queue 0 CQ creation failure.
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00151|dpdk|ERR|mlx5_net: port 0 Tx queue allocation failed: Input/output error
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00152|netdev_dpdk|ERR|Interface pf start error: Input/output error
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00153|netdev_dpdk|INFO|pf: rx-steering: default rss
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00154|dpif_netdev|ERR|Failed to set interface pf new configuration
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00155|dpif|WARN|netdev@ovs-netdev: failed to add pf as port: Invalid argument
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00156|bridge|WARN|could not add network device pf to ofproto (Invalid argument)
9月 27 09:23:10 HomeServer ovs-vswitchd[1298]: ovs|00157|dpdk|INFO|Device with port_id=0 already stopped

Maintainer information: @adamcstephens @kmcopper @netixx @xddxdd

Metadata

xddxdd commented 1 month ago

Hi, I do not have a CX6-LX NIC, or any other Mellanox NICs that support switchdev, so I cannot reproduce the problem. I only have a CX3 which works well with OVS-DPDK.

If possible, please try running OVS-DPDK using another Linux distro, and see if the NIC can be used in this case. This will help us find out if it's an issue with OVS-DPDK, or an issue with packaging in nixpkgs.

adamcstephens commented 1 month ago

You could also try unstable, which is newer (3.4) than what stable has (3.3)

lzslab commented 1 month ago

Hi, I do not have a CX6-LX NIC, or any other Mellanox NICs that support switchdev, so I cannot reproduce the problem. I only have a CX3 which works well with OVS-DPDK.

If possible, please try running OVS-DPDK using another Linux distro, and see if the NIC can be used in this case. This will help us find out if it's an issue with OVS-DPDK, or an issue with packaging in nixpkgs.

Hi, CX6 legacy mode work fine,too.

I tried it in ubuntu 24.04, inbox mlx5_core and repo ovs-dpdk, it work fine.

lzslab commented 1 month ago

You could also try unstable, which is newer (3.4) than what stable has (3.3)

Hi, I tried both,same issues.