DPDK PDUMP Issue
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if you can help us in this regard.
This issue is specific to DPDK 19.05 version or may be newer versions and was not found on DPDK 18.08 version.
The issue is that when we built DPDK in shared library mode and try to run PDUMP we get following error on PDUMP console:
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failed
On Debugging above error message, I found that inside rte_dev_probe() function in the file lib/librte_eal/common/eal_common_dev.c , req.result = -14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.
However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue and it worked fine.
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=y
I ran PDUMP with testpmd as primary application and was trying to send some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Attached are the logs for both testpmd and pdump in both DPDK19_05 and DPDK_18_08 version for your reference.
Let us know if you can help in this regard.
Thanks,
Dikshant
[root@flexran3 x86_64-native-linuxapp-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/opt/dpdk-18.08_pdump/capture.pcap'
EAL: Detected 40 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_242298_bf92949544f44 EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e Port 1 MAC: 00 00 00 01 02 03
^C
Signal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####
-packets dequeued: 32 -packets transmitted to vdev: 32 -packets freed: 0
[root@flexran3 x86_64-native-linuxapp-icc]#
[root@flexran3 x86_64-native-linuxapp-icc]# ./app/testpmd -c 0xf0 -n 4 -- -i --port-topology=chained
EAL: Detected 40 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
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
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 1)
Port 0: 3C:FD:FE:CD:34:A4
Checking link statuses...
Done
testpmd>
Port 0: LSC event
testpmd>
testpmd>
testpmd> start tx_first
io packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP over anonymous pages disabled Logical Core 5 (socket 0) forwards packets on 1 streams:
RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00
io packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=1 port 0: RX queue number: 1 Tx queue number: 1
Rx offloads=0x1000 Tx offloads=0x10000
RX queue: 0
RX desc=256 - RX free threshold=32
RX threshold registers: pthresh=8 hthresh=8 wthresh=0 RX Offloads=0x0
TX queue: 0
TX desc=256 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0 TX offloads=0x0 - TX RS bit threshold=32
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 32 TX-dropped: 0 TX-total: 32
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 32 TX-dropped: 0 TX-total: 32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
testpmd>
[root@flexran3 x86_64-native-linux-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/mnt/data/dchitkara/DPDK_2020_01_30_x86/capture.pcap'
EAL: Detected 40 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_230173_27baa83cf2e36 EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: Failed to hotplug add device
Inside rte_dev_probe,req.result = -14
EAL: Error - exiting with code: 1
Cause: vdev creation failed
[root@flexran3 x86_64-native-linux-icc]#
[root@flexran3 x86_64-native-linux-icc]# ./app/testpmd -c 0xf0 -n 4 -- -i --port-topology=chained
EAL: Detected 40 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
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
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 1)
Port 0: 3C:FD:FE:CD:34:A4
Checking link statuses...
Done
testpmd>
Port 0: link state change event
testpmd>
testpmd>
testpmd> EAL: failed to parse device "vdev:net_pcap_tx_0"
EAL: Failed to hotplug add device on primary
testpmd>
testpmd>
Quoted 21 lines · On Tue, 14 Jul 2020 08:40:55 +0000 Dikshant Chitkara <[email protected]>…
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if you can help us in this regard.
This issue is specific to DPDK 19.05 version or may be newer versions and was not found on DPDK 18.08 version.
The issue is that when we built DPDK in shared library mode and try to run PDUMP we get following error on PDUMP console:
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failedOn Debugging above error message, I found that inside
rte_dev_probe()function in the filelib/librte_eal/common/eal_common_dev.c, req.result = -14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue and it worked fine.
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=y
Quoted 9 lines
I ran PDUMP with testpmd as primary application and was trying to send some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Attached are the logs for both testpmd and pdump in both
DPDK19_05andDPDK_18_08version for your reference.Let us know if you can help in this regard.
Thanks,
Dikshant
Pdump runs as secondary process, what is your primary process.
Is the secondary process using the same exact versions of DPDK and libraries as the primary process? The secondary process needs access to the same devices and drivers as the primary process to work.
Snipped
Quoted 43 lines
Quoted 3 lines · Dikshant Chitkara
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if
you can help us in this regard.
Quoted 2 lines
This issue is specific to DPDK 19.05 version or may be newer versions and
was not found on DPDK 18.08 version.
Quoted 2 lines
The issue is that when we built DPDK in shared library mode and try to run
PDUMP we get following error on PDUMP console:
Quoted 6 lines
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failedOn Debugging above error message, I found that inside
rte_dev_probe()function in the file
lib/librte_eal/common/eal_common_dev.c, req.result = - 14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.Quoted 2 lines
However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue
and it worked fine.
Quoted 7 lines
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=yI ran PDUMP with testpmd as primary application and was trying to send
some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Quoted 2 lines
Attached are the logs for both testpmd and pdump in both
DPDK19_05and
DPDK_18_08version for your reference.Quoted 6 lines
Let us know if you can help in this regard.
Thanks,
Dikshant
Quoted 5 lines
Pdump runs as secondary process, what is your primary process.
Is the secondary process using the same exact versions of DPDK and libraries as the primary process?
The secondary process needs access to the same devices and drivers as the primary process to work.
Based on the log files shared, I have made assumptions as
1. Primary: testpmd
2. DPDK version: 19.05
3. SHARED LIB in .config: yes
4. export LD_LIBRARY_PATH: yes
Using arguments passed in primary, I faced error
``` EAL: Error - exiting with code: 1 Cause: Creation of mbuf pool for socket 0 failed: Invalid argument Cause: Mempool creation failed: Invalid argument ```
Hence had to modify with -d librte_mempool_ring.so. Using arguments passed in secondary, I faced similar error too.
With these corrections, I am able to get similar error shared as
``` EAL: failed to parse device "vdev:net_pcap_tx_0" EAL: Failed to hotplug add device on primary EAL: Error - exiting with code: 1 Cause: vdev creation failed ```
Checking the testpmd Makefile, it is narrowed down to missing PCAP_PMD build factor. I rebuild testpmd with LD_FLAGS="-lrte_pmd_pcap" make and re-ran the same. With this I can get it working properly.
Ideally there should had been an entry in Makefile as
``` ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap endif ```
reference: This is similar to the error and solution provided in https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device/62869287#62869287
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture any packets.
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:
ret_pdump = rte_pdump_init();
if (ret_pdump < 0) {
printf("rte_pdump_init failed\n");
}
else
{
printf("rte_pdump_init success\n");
}2. Makefile modified to add all relevant files to be linked:
LIB_SO =-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump -lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -lrte_eventdev -lrte_bus_vmbus -lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor -lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_timer -lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_sch
Even tried to link final DPDK lib so as well:LIB_SO =-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -L/usr/lib/x86_64-linux-gnu/ -fPIC
It seems both apps are able to connect over mp socket but pdump unable to capture data sent from primary app.
Can you tell us what else we might be missing here.
Note: We are using DPDK 19_05 built in shared lib mode.
Primary app console:
EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
rte_pdump_init successpool_create successed
DPDK TX Ethernet device (destination) opened successfully Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Quoted 1 line
Quoted 1 line
Quoted 1 line
Pdump console:
[root@flexran3 x86_64-native-linux-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/home/dchitkara/capture.pcap'
EAL: Detected 80 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_45398_5ed780258ea46 EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e Port 1 MAC: 02 70 63 61 70 00
core (0), capture for (1) tuples
- port 0 device ((null)) queue 65535
^C
Signal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####
-packets dequeued: 0 -packets transmitted to vdev: 0 -packets freed: 0
[root@flexran3 x86_64-native-linux-icc]#
-----Original Message-----
From: Varghese, Vipin <[email protected]>
Sent: 22 July 2020 09:38
To: Stephen Hemminger <[email protected]>; Dikshant Chitkara <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP Issue
NOT FROM AIRSPAN - Caution - External from: [email protected] Snipped
Quoted 51 lines
Quoted 4 lines · Dikshant Chitkara
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if
you can help us in this regard.
Quoted 3 lines
This issue is specific to DPDK 19.05 version or may be newer versions and
was not found on DPDK 18.08 version.
Quoted 3 lines
The issue is that when we built DPDK in shared library mode and try to run
PDUMP we get following error on PDUMP console:
Quoted 7 lines
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failedOn Debugging above error message, I found that inside
rte_dev_probe()function in the file
lib/librte_eal/common/eal_common_dev.c, req.result = -
14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.Quoted 3 lines
However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue
and it worked fine.
Quoted 8 lines
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=yI ran PDUMP with testpmd as primary application and was trying to send
some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Quoted 3 lines
Attached are the logs for both testpmd and pdump in both
DPDK19_05and
DPDK_18_08version for your reference.Quoted 6 lines
Let us know if you can help in this regard.
Thanks,
Dikshant
Quoted 5 lines
Pdump runs as secondary process, what is your primary process. Is the secondary process using the same exact versions of DPDK and libraries as the primary process?
The secondary process needs access to the same devices and drivers as the primary process to work.
Based on the log files shared, I have made assumptions as
1. Primary: testpmd
2. DPDK version: 19.05
3. SHARED LIB in .config: yes
4. export LD_LIBRARY_PATH: yes
Using arguments passed in primary, I faced error ```
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Invalid argument
Cause: Mempool creation failed: Invalid argument ```
Hence had to modify with -d librte_mempool_ring.so. Using arguments passed in secondary, I faced similar error too.
With these corrections, I am able to get similar error shared as ```
EAL: failed to parse device "vdev:net_pcap_tx_0"
EAL: Failed to hotplug add device on primary
EAL: Error - exiting with code: 1
Cause: vdev creation failed
```
Checking the testpmd Makefile, it is narrowed down to missing PCAP_PMD build factor. I rebuild testpmd with LD_FLAGS="-lrte_pmd_pcap" make and re-ran the same. With this I can get it working properly.
Ideally there should had been an entry in Makefile as ``` ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap endif ```
reference: This is similar to the error and solution provided in https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device/62869287#62869287
Quoted 196 lines · On Tue, 28 Jul 2020 14:51:58 +0000 Dikshant Chitkara <[email protected]>…
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture any packets.
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump -lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -lrte_eventdev -lrte_bus_vmbus -lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor -lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_timer -lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_schEven tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -L/usr/lib/x86_64-linux-gnu/ -fPICIt seems both apps are able to connect over mp socket but pdump unable to capture data sent from primary app.
Can you tell us what else we might be missing here.
Note: We are using DPDK 19_05 built in shared lib mode.
Primary app console:
EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
rte_pdump_initsuccesspool_createsuccessed
DPDK TX Ethernet device (destination) opened successfully Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32
Before send burst
Packets sent. Count=32Quoted 1 line
Quoted 1 line
Quoted 1 line
Pdump console:
[root@flexran3 x86_64-native-linux-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/home/dchitkara/capture.pcap'
EAL: Detected 80 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_45398_5ed780258ea46 EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e Port 1 MAC: 02 70 63 61 70 00core (0), capture for (1) tuples
- port 0 device ((null)) queue 65535
^CSignal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####-packets dequeued: 0 -packets transmitted to vdev: 0 -packets freed: 0[root@flexran3 x86_64-native-linux-icc]#
-----Original Message-----
From: Varghese, Vipin <[email protected]>
Sent: 22 July 2020 09:38
To: Stephen Hemminger <[email protected]>; Dikshant Chitkara <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP IssueNOT FROM AIRSPAN - Caution - External from: [email protected] Snipped
Quoted 51 lines
Quoted 4 lines · Dikshant Chitkara
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if
you can help us in this regard.
Quoted 3 lines
This issue is specific to DPDK 19.05 version or may be newer versions and
was not found on DPDK 18.08 version.
Quoted 3 lines
The issue is that when we built DPDK in shared library mode and try to run
PDUMP we get following error on PDUMP console:
Quoted 7 lines
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failedOn Debugging above error message, I found that inside
rte_dev_probe()function in the file
lib/librte_eal/common/eal_common_dev.c, req.result = -
14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.Quoted 3 lines
However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue
and it worked fine.
Quoted 8 lines
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=yI ran PDUMP with testpmd as primary application and was trying to send
some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Quoted 3 lines
Attached are the logs for both testpmd and pdump in both
DPDK19_05and
DPDK_18_08version for your reference.Quoted 6 lines
Let us know if you can help in this regard.
Thanks,
DikshantQuoted 5 lines
Pdump runs as secondary process, what is your primary process. Is the secondary process using the same exact versions of DPDK and libraries as the primary process?
The secondary process needs access to the same devices and drivers as the primary process to work.Based on the log files shared, I have made assumptions as
1. Primary: testpmd
2. DPDK version: 19.05
3. SHARED LIB in .config: yes
4. exportLD_LIBRARY_PATH: yesUsing arguments passed in primary, I faced error ```
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Invalid argumentCause: Mempool creation failed: Invalid argument ```
Hence had to modify with
-d librte_mempool_ring.so. Using arguments passed in secondary, I faced similar error too.With these corrections, I am able to get similar error shared as ```
EAL: failed to parse device "vdev:net_pcap_tx_0"
EAL: Failed to hotplug add device on primary
EAL: Error - exiting with code: 1
Cause: vdev creation failed
```
Quoted 7 lines
Checking the testpmd
Makefile, it is narrowed down to missingPCAP_PMDbuild factor. I rebuild testpmd withLD_FLAGS="-lrte_pmd_pcap" makeand re-ran the same. With this I can get it working properly.Ideally there should had been an entry in
Makefileas ``` ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap endif ```reference: This is similar to the error and solution provided in
https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device/62869287#62869287
The primary/secondary work is that both processes have to discover the same memory areas and devices.
The NUMA thing might be related, does your system have multiple cpu sockets. What does the cpu_layout python script show.
Hi Stephen,
Our system has 2 sockets as seen from below :
[root@flexran3 dchitkara]# lscpu
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 80 On-line CPU(s) list: 0-79 Thread(s) per core: 2 Core(s) per socket: 20 Socket(s): 2 NUMA node(s): 2
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: 28 July 2020 21:54
To: Dikshant Chitkara <[email protected]>
Cc: Varghese, Vipin <[email protected]>; [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: Re: [dpdk-dev] DPDK PDUMP Issue
Quoted 190 lines · NOT FROM AIRSPAN - Caution - External from: [email protected] On Tue…
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture any packets.
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump -lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -lrte_eventdev -lrte_bus_vmbus -lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor -lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_timer -lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_schEven tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -L/usr/lib/x86_64-linux-gnu/ -fPICIt seems both apps are able to connect over mp socket but pdump unable to capture data sent from primary app.
Can you tell us what else we might be missing here.
Note: We are using DPDK 19_05 built in shared lib mode.
Primary app console:
EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
rte_pdump_initsuccesspool_createsuccessed
DPDK TX Ethernet device (destination) opened successfully Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32 Before send burst Packets sent. Count=32Quoted 1 line
Quoted 1 line
Quoted 1 line
Pdump console:
[root@flexran3 x86_64-native-linux-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/home/dchitkara/capture.pcap'
EAL: Detected 80 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket/var/run/dpdk/rte/mp_socket_45398_5ed780258ea46EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e Port 1 MAC: 02 70 63 61 70 00core (0), capture for (1) tuples
- port 0 device ((null)) queue 65535
^CSignal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####-packets dequeued: 0 -packets transmitted to vdev: 0 -packets freed: 0[root@flexran3 x86_64-native-linux-icc]#
-----Original Message-----
From: Varghese, Vipin <[email protected]>
Sent: 22 July 2020 09:38
To: Stephen Hemminger <[email protected]>; Dikshant Chitkara <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP IssueNOT FROM AIRSPAN - Caution - External from: [email protected] Snipped
Quoted 51 lines
Quoted 4 lines · Dikshant Chitkara
Hi Team,
We are facing an issue w.r.t to using DPDK PDUMP utility and want to check if
you can help us in this regard.
Quoted 3 lines
This issue is specific to DPDK 19.05 version or may be newer versions and
was not found on DPDK 18.08 version.
Quoted 3 lines
The issue is that when we built DPDK in shared library mode and try to run
PDUMP we get following error on PDUMP console:
Quoted 7 lines
EAL: Failed to hotplug add device
EAL: Error - exiting with code: 1
Cause: vdev creation failedOn Debugging above error message, I found that inside
rte_dev_probe()function in the file
lib/librte_eal/common/eal_common_dev.c, req.result = -
14 which is non-zero value and points to enum EFAULT (Bad address) value, thus leading to above error.Quoted 3 lines
However, when I ran PDUMP in DPDK 18.08, I did not observe any such issue
and it worked fine.
Quoted 8 lines
DPDK was built with following flags set in config/common_base file:
CONFIG_RTE_LIBRTE_PMD_PCAP=yCONFIG_RTE_LIBRTE_PDUMP=yI ran PDUMP with testpmd as primary application and was trying to send
some traffic on the Ethernet dpdk port using testpmd and capture it using pdump.
Quoted 3 lines
Attached are the logs for both testpmd and pdump in both
DPDK19_05and
DPDK_18_08version for your reference.Quoted 6 lines
Let us know if you can help in this regard.
Thanks,
DikshantQuoted 5 lines
Pdump runs as secondary process, what is your primary process. Is the secondary process using the same exact versions of DPDK and libraries as the primary process?
The secondary process needs access to the same devices and drivers as the primary process to work.Based on the log files shared, I have made assumptions as
1. Primary: testpmd
2. DPDK version: 19.05
3. SHARED LIB in .config: yes
4. exportLD_LIBRARY_PATH: yesUsing arguments passed in primary, I faced error ```
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Invalid argumentCause: Mempool creation failed: Invalid argument ```
Hence had to modify with
-d librte_mempool_ring.so. Using arguments passed in secondary, I faced similar error too.With these corrections, I am able to get similar error shared as ```
EAL: failed to parse device "vdev:net_pcap_tx_0"
EAL: Failed to hotplug add device on primary
EAL: Error - exiting with code: 1
Cause: vdev creation failed
```
Quoted 10 lines
Checking the testpmd
Makefile, it is narrowed down to missingPCAP_PMDbuild factor. I rebuild testpmd withLD_FLAGS="-lrte_pmd_pcap" makeand re-ran the same. With this I can get it working properly.Ideally there should had been an entry in
Makefileas ``` ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap endif ```reference: This is similar to the error and solution provided in `
https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotp
lug-add-device/62869287#62869287`
The primary/secondary work is that both processes have to discover the same memory areas and devices.
The NUMA thing might be related, does your system have multiple cpu sockets. What does the cpu_layout python script show.
Quoted 4 lines · On Tue, 28 Jul 2020 16:41:38 +0000 Dikshant Chitkara <[email protected]>…
Hi Stephen,
Our system has 2 sockets as seen from below :[root@flexran3 dchitkara]# lscpu
Quoted 9 lines
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 80 On-line CPU(s) list: 0-79 Thread(s) per core: 2 Core(s) per socket: 20 Socket(s): 2 NUMA node(s): 2
Did you configure hugepages on both NUMA nodes?
You might be able to get away with only doing one node that has the device attached but probably both need to have dedicated hugepages.
Hi Stephen,
If that was the case, then how come pdump worked with testpmd?
See below testpmd with pdumg log:
Testpmd:
[root@flexran3 x86_64-native-linux-icc]# ./app/testpmd -c 0xf0 -n 4 -- -i --port-topology=chained
EAL: Detected 80 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e
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
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 1)
Port 0: 3C:FD:FE:CD:34:A4
Checking link statuses...
Done
testpmd>
Port 0: link state change event
testpmd>
testpmd>
testpmd> start tx_first
io packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP allocation mode: native Logical Core 5 (socket 0) forwards packets on 1 streams:
RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00
io packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=1 port 0: RX queue number: 1 Tx queue number: 1
Rx offloads=0x0 Tx offloads=0x10000
RX queue: 0
RX desc=256 - RX free threshold=32
RX threshold registers: pthresh=8 hthresh=8 wthresh=0 RX Offloads=0x0
TX queue: 0
TX desc=256 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0 TX offloads=0x10000 - TX RS bit threshold=32
port 1: RX queue number: 1 Tx queue number: 1
Rx offloads=0x0 Tx offloads=0x0
Invalid RX queue_id=0
RX queue: 0
RX desc=0 - RX free threshold=0
RX threshold registers: pthresh=0 hthresh=0 wthresh=0 RX Offloads=0x0
TX queue: 0
TX desc=0 - TX free threshold=0
TX threshold registers: pthresh=0 hthresh=0 wthresh=0 TX offloads=0x0 - TX RS bit threshold=0
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 32 TX-dropped: 0 TX-total: 32
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 32 TX-dropped: 0 TX-total: 32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
PDUMP:
[root@flexran3 x86_64-native-linux-icc]# ./app/dpdk-pdump -d librte_pmd_i40e.so -d librte_pmd_pcap.so -- --pdump 'port=0,queue=*,tx-dev=/home/dchitkara/capture.pcap'
EAL: Detected 80 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_120725_2d88411f7f7d4 EAL: Probing VFIO support... EAL: PCI device 0000:41:00.0 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:41:00.1 on NUMA socket 0 EAL: probe driver: 8086:37d2 net_i40e EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:86:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:158b net_i40e Port 1 MAC: 02 70 63 61 70 00
core (0), capture for (1) tuples
- port 0 device ((null)) queue 65535
^C
Signal 2 received, preparing to exit...
##### PDUMP DEBUG STATS #####
-packets dequeued: 32 -packets transmitted to vdev: 32 -packets freed: 0
[root@flexran3 x86_64-native-linux-icc]
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: 28 July 2020 22:34
To: Dikshant Chitkara <[email protected]>
Cc: Varghese, Vipin <[email protected]>; [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: Re: [dpdk-dev] DPDK PDUMP Issue
Quoted 4 lines · NOT FROM AIRSPAN - Caution - External from: [email protected] On Tue…
Hi Stephen,
Our system has 2 sockets as seen from below :[root@flexran3 dchitkara]# lscpu
Quoted 9 lines
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 80 On-line CPU(s) list: 0-79 Thread(s) per core: 2 Core(s) per socket: 20 Socket(s): 2 NUMA node(s): 2
Did you configure hugepages on both NUMA nodes?
You might be able to get away with only doing one node that has the device attached but probably both need to have dedicated hugepages.
Snipped
Quoted 29 lines
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture any packets.
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump-lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -lrte_eventdev -lrte_bus_vmbus-lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor-lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_timer -lrte_hash-lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_sch
Quoted 3 lines
Even tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -
L/usr/lib/x86_64-linux-gnu/ -fPIC
Ok, I think I have seen similar outcomes in custom Makefiles. Can you execute with make -n with the master Makefile and cross the necessary libraries are in bound between -Wl,--whole-archive and -Wl,--no-whole-archive (specically for shared libraries).
snipped
Hi Vipin,
I tried using -Wl,--whole-archive and -Wl,--no-whole-archive option with my necessary libraries but it does not seem to help as well.
Below is the makefile log for my app:
g++ -shared -Wl,--export-dynamic packet_generator.o -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/lib -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member -Wl,-lrte_eventdev -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive -o ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.so
Thanks,
Dikshant
-----Original Message-----
From: Varghese, Vipin <[email protected]>
Sent: 29 July 2020 06:30
To: Dikshant Chitkara <[email protected]>; Stephen Hemminger <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP Issue
NOT FROM AIRSPAN - Caution - External from: [email protected] Snipped
Quoted 30 lines
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture any packets.
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump-lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -lrte_eventdev -lrte_bus_vmbus-lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor-lrte_reorder -lrte_kni -lrte_pipeline(quoted diff) +0
-2-lrte_table -lrte_timer - lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_sch
Quoted 3 lines
Even tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -
L/usr/lib/x86_64-linux-gnu/ -fPIC
Ok, I think I have seen similar outcomes in custom Makefiles. Can you execute with make -n with the master Makefile and cross the necessary libraries are in bound between -Wl,--whole-archive and -Wl,--no-whole-archive (specically for shared libraries).
snipped
Hi Dikshant,
Looks like the custom Makefile log is quite different in passing DPDK CFLAGS and LDFLAGS. Also here are couple of surprises for me
1. Unable to find make -n logs
2. presence of g++ is present in each line
3. unable to find include option
4. request was to run make -n and cross the relevant libraries are bound within the -Wl,--whole-archive and -Wl,--no-whole-archive .
5. Unable to find -Wl,-lpcap passed for -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump
Hint: I normally take up sample like example/l2fwd and work towards to removing unwanted libraries while keeping the content and format intact for my custom makefile.
Quoted 84 lines
-----Original Message-----
From: Dikshant Chitkara <[email protected]>
Sent: Wednesday, July 29, 2020 2:44 PM
To: Varghese, Vipin <[email protected]>; Stephen Hemminger <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP IssueHi Vipin,
I tried using
-Wl,--whole-archiveand-Wl,--no-whole-archiveoption with my necessary libraries but it does not seem to help as well.Below is the makefile log for my app:
g++ -shared -Wl,--export-dynamic packet_generator.o
g++ -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/li g++ b -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member g++ -Wl,-lrte_eventdev -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump g++ -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci
g++ -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor g++ -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table g++ -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats g++ -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter g++ -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group g++ -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev g++ -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal g++ -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond g++ -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe g++ -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k g++ -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring g++ -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm -Wl,-ldl g++ -Wl,--end-group -Wl,--no-whole-archive -o
g++ ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.soThanks,
DikshantSnipped
Quoted 7 lines
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture
any packets.
Quoted 13 lines
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }Quoted 5 lines
2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump-lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempool -lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -
lrte_eventdev-Quoted 8 lines
lrte_bus_vmbus-lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor-lrte_reorder -lrte_kni -lrte_pipeline -lrte_table(quoted diff) +0
-2-lrte_timer - lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_schEven tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -
L/usr/lib/x86_64-linux-gnu/ -fPICOk, I think I have seen similar outcomes in custom Makefiles. Can you execute with
make -nwith the masterMakefileand cross the necessary libraries are in bound between-Wl,--whole-archiveand-Wl,--no-whole-archive(specically for shared libraries).snipped
Couple more request,
1. please avoid NOT FROM AIRSPAN - Caution - External headers & banners.
2. If possible, use snip or snipped to remove clutter and bring foucs
Snipped
Quoted 21 lines
Hi Dikshant,
Looks like the custom
Makefilelog is quite different in passing DPDK CFLAGS and LDFLAGS. Also here are couple of surprises for me1. Unable to find
make -nlogs2. presence of g++ is present in each line
3. unable to find include option
4. request was to run
make -nand cross the relevant libraries are bound within the-Wl,--whole-archiveand-Wl,--no-whole-archive.5. Unable to find
-Wl,-lpcappassed for-Wl,-lrte_pmd_pcap -Wl,- lrte_pdumpHint: I normally take up sample like example/l2fwd and work towards to removing unwanted libraries while keeping the content and format intact for my custom makefile.
snipped
Quoted 29 lines
Quoted 29 lines
Hi Vipin,
I tried using
-Wl,--whole-archiveand-Wl,--no-whole-archiveoption with my necessary libraries but it does not seem to help as well.Below is the makefile log for my app:
g++ -shared -Wl,--export-dynamic packet_generator.o
g++ -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/ g++ li b -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member g++ -Wl,-lrte_eventdev -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump g++ -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci
g++ -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor g++ -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table g++ -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats g++ -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter g++ -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group g++ -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev g++ -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal g++ -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond g++ -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe g++ -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k g++ -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring g++ -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm g++ -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive -o
g++ ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.so
snipped
Quoted 46 lines
Quoted 30 lines
Quoted 9 lines
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture
any packets.
Quoted 17 lines
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump-lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempoolReview
Quoted 2 lines
(quoted diff) +0
-2-lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -
lrte_eventdev-Quoted 7 lines
Quoted 7 lines
lrte_bus_vmbus-lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor-lrte_reorder -lrte_kni -lrte_pipeline(quoted diff) +0
-2-lrte_table -lrte_timer - lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_schEven tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -
Quoted 8 lines
Quoted 1 line
L/usr/lib/x86_64-linux-gnu/ -fPIC
Ok, I think I have seen similar outcomes in custom Makefiles. Can you execute with
make -nwith the masterMakefileand cross the necessary libraries are in bound between-Wl,--whole-archiveand-Wl,--no-whole-archive(specically for shared libraries).snipped
Hi Vipin,
Here is full log with include option and build with make -n option from master makefile as well:
make[2]: Entering directory `/mnt/data/dchitkara/PHY5G/Prototype/NR_5G_SIM/Tests/COMMON/PACKET_GENERATOR'
echo ./packet_generator.cc -msse4.1 -I../../../COMMON/Sys_API/Math_API/ -I../../../COMMON/Sys_API/Math_API/ -I../../../COMMON/Sys_API/Module_API/ -I../../../COMMON/Sys_API/common_intel/
echo packet_generator.o
test -d || mkdir -p
g++ -msse4.1 -I../../../COMMON/Sys_API/Math_API/ -I../../../COMMON/Sys_API/Math_API/ -I../../../COMMON/Sys_API/Module_API -I./ -DTIME_DATE=\"DATE:29/07/20_TIME:09:57:19\" -DMOD_NAME=\"PACKET_GENERATOR_TEST_MOD\" -DARCH_X86 -I/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/include -I -DAS_INFRA_NULL=0 -DEMULATOR_MODE -DINTEL -std=c++11 -D_4x4_ -O3 -g -DDEBUG -fPIC -c ./packet_generator.cc
echo /usr/local/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/pstl/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/ipp/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/mkl/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/ipp/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/mkl/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/pstl/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/daal/include
echo packet_generator.o
test -d ../../../COMMON/../bin || mkdir -p ../../../COMMON/../bin
g++ -shared -Wl,--export-dynamic packet_generator.o -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/lib -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member -Wl,-lrte_eventdev -Wl,-lpcap -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive -o ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.so make[2]: Leaving directory `/mnt/data/dchitkara/PHY5G/Prototype/NR_5G_SIM/Tests/COMMON/PACKET_GENERATOR'
Please have a note that module we are running is just one part of our CPP project treated as a separate test module.
Thanks,
Dikshant
-----Original Message-----
From: Varghese, Vipin <[email protected]>
Sent: 29 July 2020 15:21
To: Dikshant Chitkara <[email protected]>; Stephen Hemminger <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP Issue
Hi Dikshant,
Looks like the custom Makefile log is quite different in passing DPDK CFLAGS and LDFLAGS. Also here are couple of surprises for me
1. Unable to find make -n logs
2. presence of g++ is present in each line
3. unable to find include option
4. request was to run make -n and cross the relevant libraries are bound within the -Wl,--whole-archive and -Wl,--no-whole-archive .
5. Unable to find -Wl,-lpcap passed for -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump
Hint: I normally take up sample like example/l2fwd and work towards to removing unwanted libraries while keeping the content and format intact for my custom makefile.
Quoted 86 lines
-----Original Message-----
From: Dikshant Chitkara <[email protected]>
Sent: Wednesday, July 29, 2020 2:44 PM
To: Varghese, Vipin <[email protected]>; Stephen Hemminger <[email protected]>
Cc: [email protected]; [email protected]; Amir Ilan <[email protected]>; Veeresh Patil <[email protected]>
Subject: RE: [dpdk-dev] DPDK PDUMP IssueHi Vipin,
I tried using
-Wl,--whole-archiveand-Wl,--no-whole-archiveoption with my necessary libraries but it does not seem to help as well.Below is the makefile log for my app:
g++ -shared -Wl,--export-dynamic packet_generator.o
g++ -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/ g++ li b -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member g++ -Wl,-lrte_eventdev -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump g++ -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci
g++ -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor g++ -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table g++ -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats g++ -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter g++ -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group g++ -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev g++ -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal g++ -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond g++ -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe g++ -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k g++ -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring g++ -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm g++ -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive -o
g++ ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.soThanks,
DikshantSnipped
Quoted 8 lines
Hi Team,
With fix suggest in prev mail thread at testpmd side, PDUMP works with testpmd.
However when we try to run our own primary app with PDUMP as a secondary process, PDUMP console comes up, however it does not capture
any packets.
Quoted 17 lines
Changes made at primary app side:
1. PDUMP initialised just after rte eal init:ret_pdump = rte_pdump_init(); if (ret_pdump < 0) { printf("rte_pdump_init failed\n"); } else { printf("rte_pdump_init success\n"); }2.
Makefilemodified to add all relevant files to be linked:
LIB_SO=-L$(DPDK_LIB) -lrte_mbuf -lrte_eal -lnuma -lrte_pmd_pcap -lrte_pdump-lrte_pmd_i40e -lrte_eal -lrte_ring -lrte_mempoolReview
Quoted 2 lines
(quoted diff) +0
-2-lrte_cryptodev -lrte_ethdev -lrte_mbuf -lrte_mempool_ring -lrte_member -
lrte_eventdev-Quoted 8 lines
lrte_bus_vmbus-lrte_pci -lrte_bus_pci -lrte_bus_vdev -lrte_net -lrte_distributor-lrte_reorder -lrte_kni -lrte_pipeline(quoted diff) +0
-2-lrte_table -lrte_timer - lrte_hash -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_schEven tried to link final DPDK lib so as well:
LIB_SO=-L$(DPDK_LIB) -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -
L/usr/lib/x86_64-linux-gnu/ -fPICOk, I think I have seen similar outcomes in custom Makefiles. Can you execute with
make -nwith the masterMakefileand cross the necessary libraries are in bound between-Wl,--whole-archiveand-Wl,--no-whole-archive(specically for shared libraries).snipped
Hi Dikshant,
Summarizing the contents from earlier mails below
1. Issue-1 shared with PDUMP not working with testpmd - solution shared and suggested what needs to be added to fix the same.
2. Issue-2 shared for custom Makefile for application not working - pointed out possible cause and missing order of libraries in CFLAGS and LDFLAGS. Suggested to use an existing working DPDK/example content for custom Makefile.
Please note I do not have the project or Makefile for use case to try it locally, hence please try
``` 5. Unable to find `-Wl,-lpcap` passed for `-Wl,-lrte_pmd_pcap -Wl,-lrte_pdump` Hint: I normally take up sample like example/l2fwd and work towards to removing unwanted libraries while keeping the content and format intact for my custom makefile. ```
Snipped
Quoted 64 lines
Hi Vipin,
Here is full log with include option and build with make -n option from master makefile as well:
make[2]: Entering directory `/mnt/data/dchitkara/PHY5G/Prototype/NR_5G_SIM/Tests/COMMON/PACKE
T_GENERATOR'
echo ./packet_generator.cc -msse4.1 -I../../../COMMON/Sys_API/Math_API/ - I../../../COMMON/Sys_API/Math_API/ -
I../../../COMMON/Sys_API/Module_API/ -
I../../../COMMON/Sys_API/common_intel/
echo packet_generator.o
test -d || mkdir -p
g++ -msse4.1 -I../../../COMMON/Sys_API/Math_API/ - I../../../COMMON/Sys_API/Math_API/ - I../../../COMMON/Sys_API/Module_API -I./ - DTIME_DATE=\"DATE:29/07/20_TIME:09:57:19\" - DMOD_NAME=\"PACKET_GENERATOR_TEST_MOD\" -DARCH_X86 - I/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/include(quoted diff) +0
-2-I -DAS_INFRA_NULL=0 -DEMULATOR_MODE -DINTEL -std=c++11 -D_4x4_ -O3 -g -DDEBUG -fPIC -c ./packet_generator.ccecho /usr/local/include:/opt/intel/system_studio_2019/compilers_and_libraries_20 19.2.187/linux/pstl/include:/opt/intel/system_studio_2019/compilers_and_lib raries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compiler s_and_libraries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019 /compilers_and_libraries_2019.2.187/linux/ipp/include:/opt/intel/system_stu dio_2019/compilers_and_libraries_2019.2.187/linux/mkl/include:/opt/intel/s ystem_studio_2019/compilers_and_libraries_2019.2.187/linux/ipp/include:/o pt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/linux/mkl/i nclude:/opt/intel/system_studio_2019/compilers_and_libraries_2019.2.187/li nux/pstl/include:/opt/intel/system_studio_2019/compilers_and_libraries_201 9.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers_and_libr aries_2019.2.187/linux/tbb/include:/opt/intel/system_studio_2019/compilers _and_libraries_2019.2.187/linux/daal/include
echo packet_generator.o
test -d ../../../COMMON/../bin || mkdir -p ../../../COMMON/../bin g++ -shared -Wl,--export-dynamic packet_generator.o
g++ -L/mnt/data/dchitkara/DPDK_2020_01_30_x86/x86_64-native-linux-icc/li g++ b -Wl,--whole-archive -Wl,-lrte_mempool_ring -Wl,-lrte_member g++ -Wl,-lrte_eventdev -Wl,-lpcap -Wl,-lrte_pmd_pcap -Wl,-lrte_pdump g++ -Wl,-lrte_bus_vmbus -Wl,-lrte_pci -Wl,-lrte_bus_pci
g++ -Wl,-lrte_bus_vdev -Wl,-lrte_net -Wl,-lrte_distributor
g++ -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table g++ -Wl,-lrte_port -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_jobstats g++ -Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_acl -Wl,-lrte_meter g++ -Wl,-lrte_sched -Wl,-lm -Wl,-lrt -Wl,-lrte_vhost -Wl,--start-group g++ -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ip_frag -Wl,-lrte_ethdev g++ -Wl,-lrte_cryptodev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal g++ -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond
g++ -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_cxgbe g++ -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_fm10k g++ -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring g++ -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_null -Wl,-lrt -Wl,-lm -Wl,-ldl g++ -Wl,--end-group -Wl,--no-whole-archive -o
g++ ../../../COMMON/../bin/PACKET_GENERATOR_TEST_MOD.so make[2]: Leaving directory `/mnt/data/dchitkara/PHY5G/Prototype/NR_5G_SIM/Tests/COMMON/PACKET_GENERATOR'Please have a note that module we are running is just one part of our CPP project treated as a separate test module.
snipped
Quoted 22 lines
Hi Dikshant,
Looks like the custom
Makefilelog is quite different in passing DPDK CFLAGS and LDFLAGS. Also here are couple of surprises for me1. Unable to find
make -nlogs2. presence of g++ is present in each line
3. unable to find include option
4. request was to run
make -nand cross the relevant libraries are bound within the-Wl,--whole-archiveand-Wl,--no-whole-archive.5. Unable to find
-Wl,-lpcappassed for-Wl,-lrte_pmd_pcap -Wl,- lrte_pdumpHint: I normally take up sample like example/l2fwd and work towards to removing unwanted libraries while keeping the content and format intact for my custom makefile.
snipped