EAL: Error - exiting with code: 1 Cause: No Ethernet ports - bye - dpdk

I was trying to get the l2fwd application to work but it keeps showing this error. I dont understand I have the NICs properly bound and hugepages configured
The error
`
./dpdk-l2fwd -l 0-3 -n 1 --no-telemetry -- -q 8 -p ffff
EAL: Detected CPU lcores: 6
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
MAC updating enabled
EAL: Error - exiting with code: 1
Cause: No Ethernet ports - bye
root#dpdku:~/dpdk/build/examples#
`
Hugepages
`
dpdk-hugepages.py -s
Node Pages Size Total
0 600 2Mb 1Gb
Hugepages mounted on /dev/hugepages
`
NICs:
`
dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:00:08.0 'RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 8139' drv=uio_pci_generic unused=8139too,vfio-pci
0000:00:09.0 'RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 8139' drv=uio_pci_generic unused=8139too,vfio-pci
Network devices using kernel driver
===================================
0000:00:03.0 'RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 8139' if=ens3 drv=8139cp unused=8139too,vfio-pci,uio_pci_generic *Active*
`

DPDK application l2fwd is just doing the right thing, not identifying the NIC you have shared. There is nothing wrong with the behaviour as this is the expected behaviour. Reason for the same is shared below as
The nic RTL-8100 is Realtek Semiconductor RTL-8100/8101L/8139 PCI Fast Ethernet Adapter
Following DPDK device enter link description here does not list the support for Realtek NIC
One can check nic vs features to go through the various PF and VF PMD, realtek driver is absent.
Also checking the online driver net PMD realtek driver is not supported.
Hence the only way to use the Realtek nic dpdk is to
bind the nic back to the kernel
use either PCAP PMD to access the device into DPDK
or use AF_XDP (if RTL supports the same), you can use AF_PACKET PMD.
Note: please at least read up on documentation or hw list from dpdk.org to understand the library and supported PMD.

Related

Unable to use paravirtualized port created from vhost-user-client after dpdk-devbind

Some context first:
I installed and configured OVS-DPDK on VM0 [ubuntu + qemu/kvm + ovs-dpdk]. As a guest running on top of VM0 I have VM1 [ubuntu + dpdk].
After a bit of googling I was able to create vhost-user-client port in OVS and consume it with VM1.
At this point I can see the product of vhost-user-client port by running:
$ sudo dpdk-devbind.py --status
Network devices using kernel driver
===================================
0000:01:00.0 'Virtio network device 1041' if=enp1s0 drv=virtio-pci unused=vfio-pci *Active*
0000:07:00.0 'Virtio network device 1041' if=enp7s0 drv=virtio-pci unused=vfio-pci *Active* <--- this is it
However after binding it using command:
sudo dpdk-devbind.py --bind=virtio-pci 0000:07:00.0
When running dpdk-testpmd, I get nb forwarding ports=0
$ sudo dpdk-testpmd
EAL: Detected 3 lcore(s)
EAL: Detected 1 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 hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: net_virtio (1af4:1041) device: 0000:01:00.0 (socket 0)
testpmd: No probed ethernet devices
testpmd: create a new mbuf pool <mb_pool_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Done
No commandline core given, start packet forwarding
io packet forwarding - ports=0 - cores=0 - streams=0 - NUMA support enabled, MP allocation mode: native
io packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=0
Press enter to exit
I dont see any clues for this in dmesg and not sure where else to look.
How can I debug this issue
As hinted in the comments, DPDK ports will work with uio_pci_generic | vfio-pci | igb_uio. Hence for a virtio network device to be used with DPDK it needs binding with vfio-pci.
Please follow the steps as
ifconfig enp7s0 down
sudo modprobe uio
sudo modprobe vfio-pci (for newer kernel this can be skipped)
sudo echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
sudo dpdk-devbind.py --bind=vfio-pci 0000:07:00.0
One done successfully dpdk application with virtio net can be used.
Note: as mentioned in the comments, it is not clear why virtio net device 0000:07:00.0 is bind with virtio-pci

testpmd: No probed ethernet devices message

I am trying to use DPDK 19.11 in centOS 8.0. I have compiled DPDK as per guidelines. Then I did bind ethernet NIC to DPDK driver and left Wifi to Linux kernel using dpdk_setup.sh.
1.When I try to use testpmd the following message is displayed.
"testpmd: No probed ethernet devices" though the port is bounded.
When I try to use dpdk_pdump, I get the message
EAL: Error - exiting with code: 1
Cause: No Ethernet ports - bye
Please find driver allocation
Network devices using DPDK-compatible driver
0000:03:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 8168' drv=igb_uio unused=r8169
Network devices using kernel driver
0000:02:00.0 'Wireless 3160 08b4' if=wlp2s0 drv=iwlwifi unused=igb_uio Active
Executed testpmd and dpdkpdump from the following folders
/home/vijay/fwldpdk/x86_64-native-linuxapp-gcc/app
testpmd output
$ sudo ./testpmd -c f -n 4 -- -i
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
testpmd: No probed ethernet devices
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Done
testpmd> show port
Bad arguments
testpmd> show port 0
Bad arguments
testpmd> show port 1
Bad arguments
DPDK_pdump output
$ sudo ./dpdk-pdump
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_75341_87718f3ca82
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: Error - exiting with code: 1
Cause: No Ethernet ports - bye
I did refer the following question
DPDK run testpmd failed. EAL:no probed ethernet device.
2.If I put wifi interface also to DPDK driver whether testpmd will forward packets between two DPDK ports?
We bring down NIC interface so that it can be bounded to DPDK driver. Do we need to bring it up once it's attached with DPDK using any command?
Any inputs on how do I resolve it?
The expectation of Having RTL and Wifi are incorrect. List of supported DPDK ports.

pktgen cannot find Mellanox port

Setup
Pktgen version 21.01.0
DPDK version 20.11
OS: ubuntu 18.04
NIC: Mellanox
driver: mlx5_core
version: 5.1-2.5.8
firmware-version: 16.28.2006 (MT_0000000012)
expansion-rom-version:
bus-info: 0000:03:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes
Issue
When I run dpdk-testpmd in dpdk 20.11 and ./dpdk-devbind -s, it can find mlx port
Network devices using kernel driver
===================================
0000:03:00.0 'MT27800 Family [ConnectX-5] 1017' if=ens1f0 drv=mlx5_core unused=vfio-pci
0000:03:00.1 'MT27800 Family [ConnectX-5] 1017' if=ens1f1 drv=mlx5_core unused=vfio-pci
0000:05:00.0 'I210 Gigabit Network Connection 1533' if=enp5s0 drv=igb unused=vfio-pci *Active*
0000:06:00.0 'I210 Gigabit Network Connection 1533' if=enp6s0 drv=igb unused=vfio-pci
0000:07:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' if=enp7s0f0 drv=ixgbe unused=vfio-pci
0000:07:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' if=enp7s0f1 drv=ixgbe unused=vfio-pci
$sudo build/app/dpdk-testpmd -c7 --vdev=net_pcap0,iface=eth0 --vdev=net_pcap1,iface=eth1 -- -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
EAL: Detected 24 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:03:00.0 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:03:00.1 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
open_iface_live(): Couldn't open eth0: eth0: No such device exists (SIOCGIFHWADDR: No such device)
open_single_iface(): Couldn't open interface eth0
vdev_probe(): failed to initialize net_pcap0 device
open_iface_live(): Couldn't open eth1: eth1: No such device exists (SIOCGIFHWADDR: No such device)
open_single_iface(): Couldn't open interface eth1
vdev_probe(): failed to initialize net_pcap1 device
EAL: Bus (vdev) probe failed.
EAL: No legacy callbacks, legacy socket not created
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=2048, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: 98:03:9B:06:AB:34
Configuring Port 1 (socket 0)
Port 1: 98:03:9B:06:AB:35
Checking link statuses...
Done
testpmd> quit
But when I run pktgen, it doesn't work.
$sudo ./Builddir/app/pktgen -c 0xff -n 3 -a 0000:03:00.1 -- -p 0x1 -P -m "[1:2].0"
Copyright (c) <2010-2020>, Intel Corporation. All rights reserved. Powered by DPDK
EAL: Detected 24 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No legacy callbacks, legacy socket not created
*** Copyright (c) <2010-2020>, Intel Corporation. All rights reserved.
*** Pktgen created by: Keith Wiles -- >>> Powered by DPDK <<<
Port: Name IfIndex Alias NUMA PCI
!PANIC!: *** Did not find any ports to use ***
PANIC in pktgen_config_ports():
*** Did not find any ports to use ***
6: [./Builddir/app/pktgen(+0x977a) [0x556f614b477a]]
5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f1721223bf7]]
4: [./Builddir/app/pktgen(+0x9319) [0x556f614b4319]]
3: [./Builddir/app/pktgen(+0x31fa7) [0x556f614dcfa7]]
2: [/usr/local/lib/x86_64-linux-gnu/librte_eal.so.21(__rte_panic+0xc5) [0x7f172221d285]]
1: [/usr/local/lib/x86_64-linux-gnu/librte_eal.so.21(rte_dump_stack+0x2e) [0x7f172223ef2e]]
Aborted
[Update-1]
I have found librte_net_mlx5.so existing in the system:
/usr/local/lib/x86_64-linux-gnu/librte_net_mlx5.so.21.0
/usr/local/lib/x86_64-linux-gnu/librte_net_mlx5.so.21
/usr/local/lib/x86_64-linux-gnu/librte_net_mlx5.so
/usr/local/lib/x86_64-linux-gnu/dpdk/pmds-21.0/librte_net_mlx5.so.21.0
/usr/local/lib/x86_64-linux-gnu/dpdk/pmds-21.0/librte_net_mlx5.so.21
/usr/local/lib/x86_64-linux-gnu/dpdk/pmds-21.0/librte_net_mlx5.so
/usr/local/lib/x86_64-linux-gnu/librte_net_mlx5.a
/home/dpdk-20.11/build/drivers/librte_net_mlx5.so.21.0
/home/dpdk-20.11/build/drivers/librte_net_mlx5.so.21
/home/dpdk-20.11/build/drivers/librte_net_mlx5.so
/home/dpdk-20.11/build/drivers/librte_net_mlx5.a.p
/home/dpdk-20.11/build/drivers/librte_net_mlx5.so.21.0.p
/home/dpdk-20.11/build/drivers/librte_net_mlx5.a
I tried add -d librte_net_mlx5.so as #Vipin Varghese's advice, and got following output:
$sudo ./Builddir/app/pktgen -c 0xff -n 3 -a 0000:03:00.1 -d librte_net_mlx5.so -- -p 0x1 -P -m "[1:2].0"
EAL: Detected 24 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:03:00.1 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
EAL: No legacy callbacks, legacy socket not created
*** Copyright (c) <2010-2020>, Intel Corporation. All rights reserved.
*** Pktgen created by: Keith Wiles -- >>> Powered by DPDK <<<
Port: Name IfIndex Alias NUMA PCI
0: mlx5_pci 11 0 15b3:1017/03:00.1
Initialize Port 0 -- TxQ 1, RxQ 1
MBUF: error setting mempool handler
!PANIC!: Cannot create mbuf pool (Default RX 0:0) port 0, queue 0, nb_mbufs 4096, socket_id 0: Invalid argument
PANIC in pktgen_mbuf_pool_create():
Cannot create mbuf pool (Default RX 0:0) port 0, queue 0, nb_mbufs 4096, socket_id 0: Invalid argument
6: [./Builddir/app/pktgen(+0x977a) [0x55fd3145f77a]]
5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f5479069bf7]]
4: [./Builddir/app/pktgen(+0x9319) [0x55fd3145f319]]
3: [./Builddir/app/pktgen(+0x3198b) [0x55fd3148798b]]
2: [/usr/local/lib/x86_64-linux-gnu/librte_eal.so.21(__rte_panic+0xc5) [0x7f547a063285]]
1: [/usr/local/lib/x86_64-linux-gnu/librte_eal.so.21(rte_dump_stack+0x2e) [0x7f547a084f2e]]
Aborted
It is evident the pktgen utility is
either not built with Mellanox PMD mlx5 based on the logs
or pktgen is not passed shared library for initlailizing MLX5 PMD
Since the DPDK used for building is DPDK version 20.11. The probability of pktgen build with the shared library is high. Passing eal argument as -d librte_net_mlx5.so should resolve the shared library issue.
Reason for not suggesting static library path is because of the logs of testpmd shows MLX5 is identified while eth0 and eth1 are non-existing interface and skipping PCAP PMD
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:03:00.0 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:03:00.1 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
[EDIT-1] requested for the proper details in comments too, none available.
[EDIT-2] to check if PKTGEN 21.01 is built with MXL5 PMD, in console check
pkg-config --cflags --libs --static libdpdk | grep -i mlx5
nm [pktgen-application] | grep -i mlx5
. Based on the updated logs, pktgen is not build with DPDK which is placed in /usr/local/lib/x86_64-linux-gnu

DPDK run testpmd failed. EAL:no probed ethernet device

I'm new to dpdk and using dpdk-stable-17.11.2 on docker.
OS is Ubuntu 14.04 and the kernel is 3.19.0-80-generic.
I've followed the dpdk-setup.sh as below and bind the igb_uio driver to my device.
[14] x86_64-native-linuxapp-gcc
[17] Insert IGB UIO module
[18] Insert VFIO module
[19] Insert KNI module
[20] Setup hugepage mappings for non-NUMA systems
[21] Setup hugepage mappings for NUMA systems
[22] Display current Ethernet/Crypto device settings
[23] Bind Ethernet/Crypto device to IGB UIO module
[24] Bind Ethernet/Crypto device to VFIO module
[25] Setup VFIO permissions
Network devices using DPDK-compatible driver
============================================
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
Network devices using kernel driver
===================================
0000:03:00.0 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' if=eth1 drv=bnx2x unused=igb_uio,vfio-pci *Active*
0000:04:00.0 'NetXtreme BCM5751 Gigabit Ethernet PCI Express 1677' if=eth0 drv=tg3 unused=igb_uio,vfio-pci *Active*
0000:07:00.0 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth3 drv=netxen_nic unused=igb_uio,vfio-pci
0000:07:00.1 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth4 drv=netxen_nic unused=igb_uio,vfio-pci
I got errors when running testpmd.
EAL: Detected 32 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No probed ethernet devices
PANIC in main():
Empty set of forwarding logical cores - check the core mask supplied in the command parameters
5: [x86_64-native-linuxapp-gcc/app/testpmd() [0x46504f]]
4: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe9117c9f45]]
3: [x86_64-native-linuxapp-gcc/app/testpmd(main+0x8fb) [0x460aab]]
2: [x86_64-native-linuxapp-gcc/app/testpmd(__rte_panic+0xb8) [0x458a7a]]
1: [x86_64-native-linuxapp-gcc/app/testpmd(rte_dump_stack+0x1a) [0x4ea2aa]]
What have I missed?
I changed CONFIG_RTE_LIBRTE_BNX2X_PMD=n to CONFIG_RTE_LIBRTE_BNX2X_PMD=y in the $RTE_SDK/config/common_base.
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
[...]
EAL: No probed ethernet devices
This error has solved.
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
[...]
EAL: No probed ethernet devices
BCM57810 seems to be unsupported by the current version of Broadcom PMD:
https://dpdk.org/doc/guides/nics/bnxt.html
As a workaround you can try to use a supported NIC instead (if possible) or a virtual device (might be much slower).
PANIC in main():
Empty set of forwarding logical cores - check the core mask supplied in the command parameters
You did not list the your command line options, but you definitely should check it for a lcore mask or core list or core map. Here is the list of EAL command line options:
https://dpdk.org/doc/guides/testpmd_app_ug/run_app.html

While using DPDK application, rte_eth_dev_count is returning 0 always

I have configured NIC cards as below:-
[root#localhost ethtool]# ../../tools/dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:81:00.0 'NetXtreme BCM5722 Gigabit Ethernet PCI Express' drv=igb_uio unused=tg3
Network devices using kernel driver
===================================
0000:02:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=ens513f0 drv=ixgbe unused=igb_uio
0000:02:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=ens513f1 drv=ixgbe unused=igb_uio
0000:04:00.0 'I350 Gigabit Network Connection' if=enp4s0f0 drv=igb unused=igb_uio
0000:04:00.3 'I350 Gigabit Network Connection' if=enp4s0f3 drv=igb unused=igb_uio
Other network devices
=====================
<none>
Crypto devices using DPDK-compatible driver
===========================================
<none>
Crypto devices using kernel driver
==================================
0000:84:00.0 'DH895XCC Series QAT' drv=dh895xcc unused=qat_dh895xcc,igb_uio
Other crypto devices
====================
<none>
When i run ethtool sample application it is giving error as 0 NIC ports as shown below:-
[root#localhost ethtool]# ./ethtool-app/ethtool-app/x86_64-native- EAL: Detected 47 lcore(s)
EAL: Probing VFIO support...
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL: probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL: probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.3 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
Number of NICs: 0
EAL: Error - exiting with code: 1
Cause: No available NIC ports!
Can someone help me in configuring ports if port configuration is wrong or something else.
The above error was coming because the below driver are not supported:-
0000:81:00.0 'NetXtreme BCM5722 Gigabit Ethernet PCI Express' drv=igb_uio unused=tg3
So Binding DPDK with supported driver solved the problem.
The dpdk-devbind.py tool might be a bit misleading here. Not all of the devices using DPDK-compatible driver is in fact supported by DPDK.
Here is the list of supported Broadcom NICs in DPDK:
http://dpdk.org/doc/guides/nics/bnxt.html
Looks like the BCM5722 is not there.
On the other hand, it looks like you have four other NICs, which are supported by the DPDK:
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL: probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL: probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.3 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
So you need to bind one of those to igb_uio and try to run the example again.