Closed dariusgrassi closed 1 week ago
It will be difficult for me to fully investigate this problem as work is too high ATM, but I have had a number of problems reported with these types of NICs. Type page pcap
it may have some more information.
If you can try using a Intel NIC and see if it works it may help narrow down the problem.
The PCAP page is also empty:
/ <PCAP Page> Ports 0-0 of 1 Copyright(c) <2010-2024>, Intel Corporation
Pktgen:/>
Thanks for the quick response. I'll post again to this thread if I can reproduce/fix the problem on Intel NICs.
I'm also able to reproduce this on a ConnectX-5, unfortunately no access to any other type of NIC at this time to rule out Mellanox as being the problem. In my case, l2p_set_pcap_info
in app/pktgen-main.c
silently fails
EDIT:
If I duplicate the call to l2p_parse_mapping
before l2p_set_pcap_info
pktgen recognizes that there's a PCAP file loaded on that port, so it seems the problem is that the port-to-PID mapping never has the chance to be initialized (see https://github.com/pktgen/Pktgen-DPDK/blob/main/app/l2p.c#L212). I believe that 4ddef5abb9c2531580a4421bbd21489b503c2ec6 thus broke the PCAP replay feature.
Note that even with this change, after doing start all
pktgen stats report 0 packets transmitted before I get a crash shortly thereafter
@dariusgrassi I've confirmed that 24.03.1 doesn't have this problem, so I would advise using no later a release than that if PCAP replay functionality is an immediate must
@pchaseh You've been immensely helpful. I've confirmed that PCAP replays are still functional for MLX NICs in v24.03.1.
I worked on PCAP crash today and it appears to work. Please give the branch fix-pcap-crash a try and let me know.
Thanks for taking a look. When I try to load the pcap on my end, I'm seeing a new error. Here are my logs:
Entering Pktgen-DPDK...
>>> sdk '/users/dwg/dpdk-stable-23.11.1', target 'x86_64-native-linux-gcc'
<module 'cfg' from 'cfg/default.cfg'>
Setup DPDK to run 'pktgen' application from cfg/default.cfg file
Notice: 0000:41:00.0 already bound to driver mlx5_core, skipping
>>> sdk '/users/dwg/dpdk-stable-23.11.1', target 'x86_64-native-linux-gcc'
<module 'cfg' from 'cfg/default.cfg'>
Trying ./usr/local/bin/pktgen
sudo -E LD_LIBRARY_PATH=.:/users/dwg/dpdk-stable-23.11.1/x86_64-native-linux-gcc/lib/x86_64-linux-gnu ./usr/local/bin/pktgen -l 1,2-4,5-7,8-10,11-13 -n 4 --proc-type auto --log-level 7 --file-prefix pg -a 41:00.0 -- -v -T -P -G -m [5:6-7].0 -s 0:/tmp/mawilab.pcap -f themes/black-yellow.theme
*** Copyright(c) <2010-2024>, Intel Corporation. All rights reserved.
*** Pktgen created by: Keith Wiles -- >>> Powered by <<<
EAL: Detected CPU lcores: 32
EAL: Detected NUMA nodes: 1
EAL: Auto-detected process type: PRIMARY
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/pg/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:41:00.0 (socket -1)
TELEMETRY: No legacy callbacks, legacy socket not created
EAL: Error - exiting with code: 1
Cause: pktgen_pcap_add: rte_zmalloc_socket() failed for pcap_info_t structure
My pcap file is only 9 KB, so I don't believe its an issue with the file size. The error output seems to be triggered here.
This seems like the pcap crash with a system only having a single NUMA region and rte_eth_dev_socket_id(pid)
returning -1 value. In a patch I have been working on to put a wrapper function around rte_zmalloc_socket_id()
make sure -1 is not returned.
Please give branch fixes-for-release
a try.
Please try the new Pktgen release 24.10.0 with the latest DPDK 24.11.0-rc1 as DPDK changed and caused compile problems
Hello,
I am having issues with enabling PCAP replay mode in Pktgen-DPDK. The behavior I observe is after supplying Pktgen with a PCAP through
-s
mode, I cannot enable PCAP mode nor inspect the PCAP, despite Pktgen correctly detecting the file.Here is the pcap I am trying to run, it only contains 178 packets:
To start Pktgen on a single port, I run the following command:
Here is the full output when starting Pktgen with this command:
The output verifies that the PCAP path was successfully detected and parsed:
However, inside Pktgen, the PCAP file is not loaded nor detected:
Upon seeing this output, I also inspected its source, which seems to be triggered in app/cli-functions.c, due to the return of
l2p_get_pcap(pinfo->pid)
being NULL. However, it's unclear to me how this is the case unless the structpcap_info_t
is not being set properly.Thus, I am unsure whether this behavior is due to a mistake on my end, intended behavior, a bug, or whether support has been deprecated. I would appreciate assistance with this as soon as possible. Thank you!