我正在尝试运行 AF_XDP 轮询模式驱动程序。内核版本为 5.4(CONFIG_XDP_SOCKETS=y)。当我运行 DPDK 网站提供的示例时,发生了错误。
root@n211-203-164:~# dpdk-testpmd --vdev=net_af_xdp0,iface=eth3 -- -i --total-num-mbufs=10240
EAL: Detected 96 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 1048576 kB hugepages reported
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:5e:00.0 (socket 0)
mlx5_net: Default miss action is not supported.
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:5e:00.1 (socket 0)
mlx5_net: Default miss action is not supported.
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:86:00.0 (socket 1)
mlx5_net: Default miss action is not supported.
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:86:00.1 (socket 1)
mlx5_net: Default miss action is not supported.
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=10240, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_1>: n=10240, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.
Configuring Port 0 (socket 0)
Port 0: B8:CE:F6:35:DB:3A
Configuring Port 1 (socket 0)
Port 1: B8:CE:F6:35:DB:3B
Configuring Port 2 (socket 1)
Port 2: B8:CE:F6:3B:31:4A
Configuring Port 3 (socket 1)
Port 3: B8:CE:F6:3B:31:4B
Configuring Port 4 (socket 0)
xsk_configure(): Failed to create xsk socket.
eth_rx_queue_setup(): Failed to configure xdp socket
Fail to configure port 4 rx queues
EAL: Error - exiting with code: 1
Cause: Start ports failed
似乎 XSK 套接字调用 bind() 失败,因此 eth_rx_queue_setup() 失败。
如何正确配置 EAL 参数以使用 vdev=af_net_xdp0 运行 dpdk-testpmd?任何帮助是极大的赞赏。