Reputation: 1
I wanted to run pdump to capture packets on the l3fwd application of dpdk. But I ran into an error, while following the steps as discussed in the dpdk document.
I am using dpdk version 24.03 and I wanted to run pdump along with the l3fwd acl application. I have modifed the l3fwd code in the following way as suggested in the dpdk docs:
#define RTE_LIBRTE_PDUMP 1
#ifdef RTE_LIBRTE_PDUMP
#include <rte_pdump.h>
#endif
and i have added
rte_pdump_uninit(); in signal_handler
signal_handler(int signum)
{
if (signum == SIGINT || signum == SIGTERM) {
printf("\n\nSignal %d received, preparing to exit...\n",
signum);
#ifdef RTE_LIBRTE_PDUMP
/* uninitialize packet capture framework */
rte_pdump_uninit();
printf("*************** PDUMP IS ALSO EXITING *********");
#endif
force_quit = true;
}
}
and I have added the below code snippet in main()
#ifdef RTE_LIBRTE_PDUMP
/* initialize packet capture framework */
rte_pdump_init();
#endif
After doing the changes, I recompiled my dpdk application and ran l3fwd acl, i'll add the output below:
sudo ./build/examples/dpdk-l3fwd -c ff -n 3 -- -p 0x3 --lookup acl --parse-ptype --config="(0,0,2),(1,0,3)" --rule_ipv4="/root/rule_ipv4.db" --rule_ipv6="/root/rule_ipv6.db" -P
EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested memzone segments exceeds maximum 0
PDUMP: rte_pdump_init(): cannot allocate pdump statistics
EAL: Detected CPU lcores: 56
EAL: Detected NUMA nodes: 2
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
EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:07:00.0 (socket 0)
EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:07:00.1 (socket 0)
*************** Initializing PDUMP !!!!! ***************soft parse-ptype is enabled
Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=8... Port 0 modified RSS hash function based on hardware support,requested:0x3bffc configured:0x38d34
Address:00:E0:ED:32:31:1C, Destination:02:00:00:00:00:00, Allocated mbuf pool on socket 0
ACL options are:
rule_ipv4: /root/rule_ipv4.db
rule_ipv6: /root/rule_ipv6.db
alg: default
L3FWDACL: IPv4 Route entries 2:
1:1.1.1.1/32 0.0.0.0/0 0 : 65535 0 : 65535 0x0/0x0 0xffffffff-0x1fffffff-0x2
2:2.2.2.2/32 0.0.0.0/0 0 : 65535 0 : 65535 0x0/0x0 0xffffffff-0x1ffffffe-0x1
L3FWDACL: IPv4 ACL entries 0:
L3FWDACL: IPv6 Route entries 1:
1:0000:0000:0000:0000:0000:0000:0000:0000/0 0000:0000:0000:0000:0000:0000:0000:0000/0 0 : 65535 0 : 65535 0x0/0x0 0xffffffff-0x1fffffff-0x1
L3FWDACL: IPv6 ACL entries 0:
acl context <l3fwd-acl-ipv40>@0x103cd8040
socket_id=0
alg=3
first_load_sz=4
max_rules=100000
rule_size=96
num_rules=2
num_categories=1
num_tries=1
acl context <l3fwd-acl-ipv60>@0x1047b0440
socket_id=0
alg=3
first_load_sz=4
max_rules=100000
rule_size=192
num_rules=1
num_categories=1
num_tries=1
txq=0,0,0 txq=1,1,0 txq=2,2,0 txq=3,3,0 txq=4,4,0 txq=5,5,0 txq=6,6,0 txq=7,7,0
Initializing port 1 ... Creating queues: nb_rxq=1 nb_txq=8... Port 1 modified RSS hash function based on hardware support,requested:0x3bffc configured:0x38d34
Address:00:E0:ED:32:31:1D, Destination:02:00:00:00:00:01, txq=0,0,0 txq=1,1,0 txq=2,2,0 txq=3,3,0 txq=4,4,0 txq=5,5,0 txq=6,6,0 txq=7,7,0
Initializing rx queues on lcore 0 ...
Initializing rx queues on lcore 1 ...
Initializing rx queues on lcore 2 ... rxq=0,0,0
Initializing rx queues on lcore 3 ... rxq=1,0,0
Initializing rx queues on lcore 4 ...
Initializing rx queues on lcore 5 ...
Initializing rx queues on lcore 6 ...
Initializing rx queues on lcore 7 ...
Port 0: softly parse packet type info
Port 1: softly parse packet type info
Checking link status.done
Port 0 Link up at 10 Gbps FDX Autoneg
Port 1 Link up at 10 Gbps FDX Autoneg
L3FWD: lcore 1 has nothing to do
L3FWD: entering main loop on lcore 2
L3FWD: -- lcoreid=2 portid=0 rxqueueid=0
L3FWD: lcore 6 has nothing to do
L3FWD: lcore 5 has nothing to do
L3FWD: entering main loop on lcore 3
L3FWD: -- lcoreid=3 portid=1 rxqueueid=0
L3FWD: lcore 7 has nothing to do
L3FWD: lcore 0 has nothing to do
L3FWD: lcore 4 has nothing to do
Then in another terminal i ran the dpdk pdump application and i got the following output:
sudo ./build/app/dpdk-pdump -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap,tx-dev=/tmp/tx.pcap'
EAL: Detected CPU lcores: 56
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_6058_8587c6a9a8c
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:07:00.0 (socket 0)
EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:07:00.1 (socket 0)
vdev_action(): failed to add vdev, net_pcap_rx_0
Port 2 MAC: 02 70 63 61 70 00
vdev_action(): failed to add vdev, net_pcap_rx_0
vdev_action(): failed to add vdev, net_pcap_tx_0
Port 3 MAC: 02 70 63 61 70 01
EAL: Fail to recv reply for request /var/run/dpdk/rte/mp_socket:mp_pdump
PDUMP: pdump_prepare_client_request(): client request for pdump enable/disable failed
EAL: Fail to recv reply for request /var/run/dpdk/rte/mp_socket:mp_pdump
PDUMP: pdump_prepare_client_request(): client request for pdump enable/disable failed
EAL: Fail to recv reply for request /var/run/dpdk/rte/mp_socket:mp_pdump
PDUMP: pdump_prepare_client_request(): client request for pdump enable/disable failed
EAL: Error - exiting with code: 1
Cause: Connection timed out
after running the pdump on another terminal and getting the error, i get this output on the l3fwd acl terminal, EAL: Cannot find action: mp_pdump
...
L3FWD: lcore 0 has nothing to do
L3FWD: lcore 4 has nothing to do
EAL: Cannot find action: mp_pdump
EAL: Cannot find action: mp_pdump
EAL: Cannot find action: mp_pdump
I dont know what is happening, it should have ran properly itself. Any help would be appreciated Regards.
Upvotes: 0
Views: 156