[dpdk-dev] Bug in ring-based pmd?

tom.barbette at ulg.ac.be tom.barbette at ulg.ac.be
Thu Dec 3 17:43:30 CET 2015


Hi list,

I try to make two DPDK process work together through a ring-based veth.

The first one fills the ring with generated packets :
./bin/click -n 4 -c 0x1 --proc-type=auto --vdev=eth_ring_0 -- conf/flow/veth-out.click
The second one reads them :
./bin/click -n 4 -c 0x2 --proc-type=auto --vdev=eth_ring_0 -- conf/flow/veth-in.click

The first one goes well, and block after a while as the ring is full.

But when I start the second one, I get :

Program received signal SIGSEGV, Segmentation fault.
0x00000000006a4b34 in rte_eth_rx_burst (nb_pkts=32, rx_pkts=0x7fffffffe2d0, queue_id=0, 
    port_id=0 '\000')
    at /home/tom/dpdk//x86_64-native-linuxapp-gcc/include/rte_ethdev.h:2418
2418				rx_pkts, nb_pkts);

With DPDK 2.0 and 2.1.

With DPDK 2.2rc2 It works exactly one time every two launches. When it fails, rte_eth_rx_burst gives me some packet but after some time, one call to  rte_eth_rx_burst will return 32 (=my burst parameter) but the first mbuf pointer is null (pkts[0]=0) and the following mubfs* are garbage.

I didn't load any real NIC during those test. 

I found out that the link_status is 1 in the primary process and 0 in the secondary one, if it may be of any help...

Relevant part of the primary process is :
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 16 lcore(s)
EAL: Auto-detected process type: PRIMARY
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffff4a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x71400000 bytes
EAL: Virtual area found at 0x7fff83400000 (size = 0x71400000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff83000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff82c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x18d800000 bytes
EAL: Virtual area found at 0x7ffdf5200000 (size = 0x18d800000)
EAL: Ask a virtual area of 0x400000 bytes
EAL: Virtual area found at 0x7ffdf4c00000 (size = 0x400000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffdf4800000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffdf4400000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffdf4000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffdf3c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7ffdf3800000 (size = 0x200000)
EAL: Requesting 4096 pages of size 2MB from socket 0
[New Thread 0x7ffff69a7700 (LWP 26992)]
EAL: TSC frequency is ~2398609 KHz
EAL: Master lcore 0 is ready (tid=f7fdf900;cpuset=[0])
PMD: Initializing pmd_ring for eth_ring_0
PMD: Creating rings-backed ethdev on numa socket 0
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1584 rte_i40e_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1584 rte_i40e_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:03:00.2 on NUMA socket 0
EAL:   probe driver: 8086:1584 rte_i40e_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:03:00.3 on NUMA socket 0
EAL:   probe driver: 8086:1584 rte_i40e_pmd
EAL:   Not managed by a supported kernel driver, skipped
Initializing DPDK (mempool, ...)
ToDPDKDevice at 2: congestion warning (ring is full)


For the secondary :

EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 16 lcore(s)
EAL: Auto-detected process type: SECONDARY
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: Analysing 4096 files
EAL: Mapped segment 0 of size 0x200000
EAL: Mapped segment 1 of size 0x71400000
EAL: Mapped segment 2 of size 0x200000
EAL: Mapped segment 3 of size 0x200000
EAL: Mapped segment 4 of size 0x18d800000
EAL: Mapped segment 5 of size 0x400000
EAL: Mapped segment 6 of size 0x200000
EAL: Mapped segment 7 of size 0x200000
EAL: Mapped segment 8 of size 0x200000
EAL: Mapped segment 9 of size 0x200000
EAL: Mapped segment 10 of size 0x200000
EAL: memzone_reserve_aligned_thread_unsafe(): memzone <RG_MP_log_history> already exists
RING: Cannot reserve memory
[New Thread 0x7ffff69a7700 (LWP 27022)]
EAL: TSC frequency is ~2398608 KHz
EAL: Master lcore 1 is ready (tid=f7fdf900;cpuset=[2])
PMD: Initializing pmd_ring for eth_ring_0
EAL: memzone_reserve_aligned_thread_unsafe(): memzone <RG_ETH_RXTX0_eth_ring_0> already exists
RING: Cannot reserve memory
PMD: Attach to pmd_ring for eth_ring_0
PMD: Creating rings-backed ethdev on numa socket 0
(...)
Initializing DPDK (<-- attach to the mempool of the first process using mempool_walk)
(First read :)
Program received signal SIGSEGV, Segmentation fault.
0x000000000068d3f6 in rte_eth_rx_burst (nb_pkts=32, rx_pkts=0x7fffffffe220, queue_id=0, 
    port_id=0 '\000')
    at /home/tom/dpdk//x86_64-native-linuxapp-gcc/include/rte_ethdev.h:2532
2532				rx_pkts, nb_pkts);


Thanks !
Tom


More information about the dev mailing list