dpdkstats plugin in collectd - dpdk

I am trying to record dpdk info using dpdkstats plugin in collectd daemon.
dpdkstats plugin configuration is given below:
<Plugin dpdkstat>
<EAL>
Coremask "0x2"
MemoryChannels "4"
FilePrefix "rte"
LogLevel "7"
# RteDriverLibPath "/usr/lib/dpdk-pmd"
</EAL>
SharedMemObj "dpdk_collectd_stats_0"
EnabledPortMask 0xffff
PortName "interface1"
PortName "interface2"
</Plugin>
and i am getting an error while starting collectd.
collectd[46862]: Initialization complete, entering read-loop.
EAL: Detected 24 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Primary and secondary process DPDK version mismatch
EAL: FATAL: Cannot init config
EAL: Cannot init config
How to resolve this error?

#SaiGanesh, the cause of error is present in the logs as
EAL: Primary and secondary process DPDK version mismatch
EAL: FATAL: Cannot init config
So please run your primary application and secondary application -stats daemon with right DPDK version
Note: humble request to always open with details like
DPDK version
physical NIC details - firmware and driver
interface or HW offloads if any
multi-process if any
code snippet to reproduce the error

Related

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

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.

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

EAL rte_service_init failed EAL Initialization error

I am trying to execute the example code in dpdk.I am getting the following error I have 2 versions of dpdk installed in system Please suggest a solution for the issue.
Blockquote
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /run/user/1000/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available 16777216 kB hugepages reported
EAL: 512 hugepages of size 2097152 reserved, but no mounted hugetlbfs found fore
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Couldn't get fd on hugepage file
EAL: error allocating rte services array
EAL: FATAL: rte_service_init() failed
EAL: rte_service_init() failed
EAL: Error - exiting with code: 1
Cause: Error with EAL initialization
Edit:Solves the issue-
echo 512|sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
[EDIT-1] based on the limited information
EAL: No available 16777216 kB huge pages reported
EAL: 512 huge pages of size 2097152 reserved, but no mounted hugetlbfs
this looks like more of
sudo issue
huge page not available issue.
[ima] Thanks, Vipin. Yes, it was hugepage related issue.

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.

EAL: Cannot obtain physical addresses: Permission denied. Only vfio will function

I am just trying to run helloworld in dpdk. I am getting this weird error however I performed all the steps in set up scripts as well as build from source but still getting the error:
dpdk#dpdk-vm:~/Desktop/dpdk-stable-17.08.1/examples/helloworld/build$ ./helloworld -c 1 -n 1
EAL: Detected 1 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Cannot obtain physical addresses: Permission denied. Only vfio will function.
EAL: WARNING: Master core has no memory on local socket!
error allocating rte services array
EAL: FATAL: rte_service_init() failed
EAL: rte_service_init() failed
PANIC in main():
Cannot init EAL
5: [./helloworld(_start+0x2a) [0x5555a79f366a]]
4: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7ff3176151c1]]
3: [./helloworld(+0x54f6d) [0x5555a79eef6d]]
2: [./helloworld(__rte_panic+0xbd) [0x5555a79ea467]]
1: [./helloworld(rte_dump_stack+0x2e) [0x5555a7a41a7e]]
Aborted (core dumped)
Please let me know what am I doing wrong?
You need to run DPDK applications as root. Please refer to the DPDK Getting Started Guide:
http://dpdk.org/doc/guides/linux_gsg/enable_func.html#running-dpdk-applications-without-root-privileges