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
Related
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.
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
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.
I'm trying to use dpdk-pdump with dpdk-stable-18.02.1.
my configurations:
CONFIG_RTE_LIBRTE_BNX2X_PMD=y
CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=y
CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=y
CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=y
CONFIG_RTE_LIBRTE_BNX2X_DEBUG_PERIODIC=y
CONFIG_RTE_LIBRTE_PMD_PCAP=y
CONFIG_RTE_LIBRTE_PDUMP=y
bind the device to DPDK:
Network devices using DPDK-compatible driver
============================================
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
And I start the primary process first:
# ./testpmd -c 3 -n 4 -- -i --total-num-mbufs=16384 --port-topology=chained
EAL: Detected 32 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL: probe driver: 14e4:168e net_bnx2x
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL: probe driver: 14e4:168e net_bnx2x
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=16384, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
rte_mempool_ops_get_capabilities: Function not supported
rte_mempool_ops_register_memory_area: Function not supported
[...]
Configuring Port 0 (socket 0)
PMD: bnx2x_interrupt_action(): Interrupt handled
PMD: bnx2x_interrupt_action(): Interrupt handled
PMD: bnx2x_interrupt_action(): Interrupt handled
Port 0: C4:34:6B:B0:EA:64
Checking link statuses...
Done
PMD: bnx2x_interrupt_action(): Interrupt handled
testpmd>
However, the secondary pdump process failed.
# ./dpdk-pdump -- --pdump 'port=0,queue=*,rx-dev=./capture.pcap'
EAL: Detected 32 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix_14636_fe8ed726aadaf
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the kernel.
EAL: This may cause issues with mapping memory into secondary processes
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL: probe driver: 14e4:168e net_bnx2x
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL: probe driver: 14e4:168e net_bnx2x
dpdk-pdump: /root/dpdk-stable-18.02.1/drivers/net/bnx2x/bnx2x_ethdev.c:563: bnx2x_common_dev_init: Assertion `sc->bar[0].base_addr' failed.
Aborted (core dumped)
Have I missed something? Please give me some information to understand this issue.
I found that I can run dpdk-pdump with ixgbe driver.
After comparing bnx2x_ethdev.c and ixgbe_ethdev.c, I found that bnx2x doesn't support multi-process:
https://dpdk.org/doc/guides/nics/overview.html
Since dpdk-pdump runs as a secondary process, it seems that it is not able to run with bnx2x.
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.