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
Related
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.
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
I'm new to DPDK, and I'm installing a DPDK version of suricata on the server. When I run suricata --list-dpdkports, it shows
EAL: Detected 128 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /tmp/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
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
5/11/2020 -- 21:41:45 - <Error> - [ERRCODE: SC_ERR_DPDK_CONFIG(319)] - DPDK init failed
What does EAL: No available hugepages reported in hugepages-1048576kB mean? No matter how many hugepages I set, it always show that.
AnonHugePages: 104448 kB
HugePages_Total: 8192
HugePages_Free: 8191
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
I'm new to DPDK, and most of the solutions I found online is about No Free hugepages reported. I really wanna know what it means. Thank you for your help.
#Ericsun the log EAL: No available hugepages reported in hugepages-1048576kB is normal as your huge page is 2048 kB. DPDK on x86 can use both 2MB or 1GB huge page. In function rte_eal_init both are probed. In your current setup, 1GB is not found. Hence rte_eal_init logs the same.
your error is
EAL: Couldn't get fd on hugepage file
EAL: error allocating rte services array
EAL: FATAL: rte_service_init() failed
Use sudo for elevating privellege and accessing hugepage via mmap.
all
I tried to run vhost app in examples/, and facing the issue below:
[]# examples/vhost/build/app/vhost-switch -l 0-3 -n 4 -- --socket-file /tmp/sock0 --client -p 0x1 --stats 20
EAL: Detected 24 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: WARNING: Master core has no memory on local socket!
EAL: PCI device 0000:07:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:07:00.1 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:09:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:10d3 net_e1000_em
VHOST_PORT:
Specified port number(1) exceeds total system port number(0)
EAL: Error - exiting with code: 1
Cause: Cannot create mbuf pool
The HugePage information is like this:
[]# sudo cat /proc/meminfo | grep Huge
AnonHugePages: 3129344 kB
HugePages_Total: 4096
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
I tried to run other apps, helloworld goes well, but ptpclient has the same problem. Rebooting is not help. How can I fix it?
Any help is appreciated.
Thanks in advance.
The real issue is here:
Specified port number(1) exceeds total system port number(0)
This means no ethernet ports has been detected. Please make sure you have bound at least one ethernet device to the UIO or VFIO driver as described in the DPDK Getting Started Guide:
https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules
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.