Hi,
I am unable to run the DpdkExample-FilterTraffic example as the function rte_mempool_create() returns null in DpdkDevice::InitMemPool.
This line. Following is the sample execution when I try to list the ports:
------------------------------------
$ sudo ./DpdkTrafficFilter -l
EAL: Detected 40 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:05:00.0 on NUMA socket 0
EAL: probe driver: 8086:158b net_i40e
EAL: PCI device 0000:05:00.1 on NUMA socket 0
EAL: probe driver: 8086:158b net_i40e
PMD: Global register is changed during enable FDIR flexible payload
PMD: Global register is changed during support QinQ parser
PMD: Global register is changed during configure hash input set
PMD: Global register is changed during configure fdir mask
PMD: Global register is changed during configure hash mask
PMD: Global register is changed during support QinQ cloud filter
PMD: Global register is changed during support TPID configuration
Failed to create packets memory pool for port 0, pool name: MBufMemPool0
Error is: 'Success' [Error code: 0]
Could not initialize mBuf mempool. Device not initialized
DPDK port list:
Port #0: MAC address='3c:fd:fe:b7:e7:f5'; PCI address='0000:00:00.0'; PMD=''
------------------------------------
The red text above are the messages from original source code of PcapPlusPlus. When I tried to debug, I used the following additional line to print the error from rte:
LOG_ERROR("Error is: '%s' [Error code: %d]\n", rte_strerror(rte_errno), rte_errno);
The output of this line is highlighted in yellow. To my surprise, the error code it returns here is 0 which translates to success! But yet, the variable memPool is NULL.
In order to check if my system setup is correct, I decided to run a DPDK example which uses rte_mempool_create() to allocate the memory pool. I ran $DPDK_HOME/examples/multi_process/simple_mp and it works perfectly well. I couldn't find out why. Maybe it was the parameters of the function rte_mempool_create(). So I changed them all as per what was working in DPDK's simple_mp example. Yet the same issue!
I have put together a sort of reduced version of the code where rte_mempool_create() is called exactly like it is called in DpdkDevice::InitMemPool and also exactly like it is called in the DPDK's simple_mp example. I am attaching this code along with the pcapplusplus style Makefile. In reduced.cpp, lines 171-174 are basically calling rte_mempool_create() like it is called in DpdkDevice::InitMemPool. On the other hand, the lines 176-195 are calling rte_mempool_create() like it is called in the DPDK's simple_mp example. There seems to be no issue with rte_eal_init() and it seems to work correctly each time.
After hours of debugging, this now seems to be some issue related to the build environment or maybe I am still missing out something. Possibly there is something different that PcapPlusPlus does, compared to what DPDK does for compiling similar code.
My setup environment
- Ubuntu 16.04.3 LTS (kernel: 4.13.0-36-generic)
- dpdk-stable-17.11.1
- PcapPlusPlus commit id c69d9a6c276569b0006c4ac7e84885530f8524bb
- Intel XXV710-DA2 NIC card | kernel operations driver: i40e | DPDK operations driver: igb_uio
Any help or advice is greatly appreciated. Thank you!
Regards,
Raj