I have installed DPDK (v20.11.0) shipped by F-stack correctly and have bonded the NICs to the igb_uio driver. The output of dpdk-devbind.py can help to verify it:
Network devices using DPDK-compatible driver
============================================
0000:04:00.0 'I210 Gigabit Network Connection 1533' drv=igb_uio unused=igb,vfio-pci,uio_pci_generic
0000:05:00.0 'I210 Gigabit Network Connection 1533' drv=igb_uio unused=igb,vfio-pci,uio_pci_generic
0000:af:00.0 'Ethernet Controller X710/X557-AT 10GBASE-T 1589' drv=igb_uio unused=i40e,vfio-pci,uio_pci_generic
Network devices using kernel driver
===================================
0000:1a:00.0 'Ethernet Connection X722 for 10GBASE-T 37d2' if=enp26s0f0 drv=i40e unused=igb_uio,vfio-pci,uio_pci_generic *Active*
0000:1a:00.1 'Ethernet Connection X722 for 10GBASE-T 37d2' if=enp26s0f1 drv=i40e unused=igb_uio,vfio-pci,uio_pci_generic *Active*
0000:af:00.1 'Ethernet Controller X710/X557-AT 10GBASE-T 1589' if=enp175s0f1 drv=i40e unused=igb_uio,vfio-pci,uio_pci_generic *Active*
0000:af:00.2 'Ethernet Controller X710/X557-AT 10GBASE-T 1589' if=enp175s0f2 drv=i40e unused=igb_uio,vfio-pci,uio_pci_generic *Active*
0000:af:00.3 'Ethernet Controller X710/X557-AT 10GBASE-T 1589' if=enp175s0f3 drv=i40e unused=igb_uio,vfio-pci,uio_pci_generic *Active*
However, when I ran some tests from this DPDK directory, such as basicfwd
, it returns an error saying number of ports must be even
. I then checked the return value of rte_eth_dev_count_avail
and it's 0.
$ sudo ./basicfwd -l 1 -n 4
EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No legacy callbacks, legacy socket not created
EAL: Error - exiting with code: 1
Cause: Error: number of ports must be even
Which is even weird is that the output of test-pmd seems like my NICs CAN be detected?
EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: net_e1000_igb (8086:1533) device: 0000:04:00.0 (socket 0)
EAL: Probe PCI driver: net_e1000_igb (8086:1533) device: 0000:05:00.0 (socket 0)
EAL: Probe PCI driver: net_i40e (8086:1589) device: 0000:af:00.0 (socket 1)
EAL: No legacy callbacks, legacy socket not created
testpmd: create a new mbuf pool <mb_pool_0>: n=715456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_1>: n=715456, 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: 74:FE:48:4D:99:E8
Configuring Port 1 (socket 0)
Port 1: 74:FE:48:4D:99:E9
Configuring Port 2 (socket 1)
Port 2: 3C:FD:FE:83:4A:18
Checking link statuses...
Done
No commandline core given, start packet forwarding
io packet forwarding - ports=3 - cores=1 - streams=3 - NUMA support enabled, MP allocation mode: native
Logical Core 1 (socket 0) forwards packets on 3 streams:
RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
RX P=2/Q=0 (socket 1) -> TX P=2/Q=0 (socket 1) peer=02:00:00:00:00:02
io packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=3
port 0: RX queue number: 1 Tx queue number: 1
Rx offloads=0x0 Tx offloads=0x0
RX queue: 0
RX desc=512 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x0
TX queue: 0
TX desc=512 - TX free threshold=0
TX threshold registers: pthresh=8 hthresh=1 wthresh=16
TX offloads=0x0 - TX RS bit threshold=0
port 1: RX queue number: 1 Tx queue number: 1
Rx offloads=0x0 Tx offloads=0x0
RX queue: 0
RX desc=512 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x0
TX queue: 0
TX desc=512 - TX free threshold=0
TX threshold registers: pthresh=8 hthresh=1 wthresh=16
TX offloads=0x0 - TX RS bit threshold=0
port 2: RX queue number: 1 Tx queue number: 1
Rx offloads=0x0 Tx offloads=0x10000
RX queue: 0
RX desc=256 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x0
TX queue: 0
TX desc=256 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0
TX offloads=0x10000 - TX RS bit threshold=32
Press enter to exit
I suspect it might be the problem of F-stack, because if I try with the latest version of DPDK, it can detect my NICs.
Could anyone help find what could be wrong in my setting? Any help would be greatly appreciated.
Based on the logs shared from dpdk-devbind you have 3 NIC ports identified under DPDK such as
Network devices using DPDK-compatible driver
============================================
0000:04:00.0 'I210 Gigabit Network Connection 1533' drv=igb_uio unused=igb,vfio-pci,uio_pci_generic
0000:05:00.0 'I210 Gigabit Network Connection 1533' drv=igb_uio unused=igb,vfio-pci,uio_pci_generic
0000:af:00.0 'Ethernet Controller X710/X557-AT 10GBASE-T 1589' drv=igb_uio unused=i40e,vfio-pci,uio_pci_generic
With respect DPDK example skeleton, it works on pair of ports that is 2, 4, 6, 8, ... etc. Hence when you run the application sudo ./basicfwd -l 1 -n 4
there would be 2 outcomes (with real option -d
not passed)
make clean; make static
the application sees 3 ports.make clean; make
the application will see 0 portsSo to resolve the problem you have 3 options
-b 0000:af:00.0
or by removing from dev-bind-a 0000:04:00.0 -a 0000:05:00.0
Note: if you have build with shared library mode, you will also need to pass the appropriate PMD driver for probing to be successful for basicfwd
. You can easily identify this since there is pci device probe
at all in the logs (--log-level=pmd,8).