I am a little bit stuck right now so I really could need some help.
I want to create a Flask interface to create and send pcaps. The create part is done with Scapy and works without problems. To send packets I want to read the created Pcap-file and use dpdk-pktgen aiming to get roughly 10G.
My problem is, that pktgen just wont work and I cant wrap my head around what I am doing wrong.
I have a test setup in EVE-NG using ubuntu-22.04, I emulate an Intel-Skylake-Server CPU and the machine has 3 ports, 1 for management, 2 for traffic.
I tried installing the newest pktgen and dpdk version, currently pktgen: 24.05.3 and dpdk: 24.07.0-rc0. But I got numerous errors compiling pktgen. After numerous attempts I switched to pktgen: 22.04.01 and dpdk: 22.11.1 following the tips from this thread.
Now I could compile pktgen, and I can start pktgen with:
sudo ./path/to/pktgen -l 0-1 -- -P -s 0:myfile.pcap
In the now open console I tried to use “str” but no traffic is generated.
What do I need to change, to generate traffic and is it possible to start the transmission without the console, so that only one command is needed?
Since I didnt want use an outdated version of dpdk and pktgen I tried to use the newest ones.
On Ubuntu-22.04 I only got compiling errors, so i switched to ubuntu-23.10. This fixed my compiling errors, but despite using the same setup as in ubuntu-22.04 I either get:
Pktgen got a Segment Fault
Obtained 7-8 stack frames
or:
EAL: Error – exiting with code: 1
Cause: pktgen_pcap_open: rte_zmalloc_socket() failed for pcap_info_t structure
I used the exact same Pcap-file and I don’t find anything for this error online.
I also tried to avoid EVE-NG, I thought maybe the emulation might be a problem. I tried ubuntu-23.10 and ubuntu-24.04 on my personal computer, but I got the same errors.
It might be important, my personal computer is running an AMD-Ryzen 5 5600X.
Also worth mentioning: I use the uio_pci_generic kernel. In EVE-NG I dont have IOMMU groups, even after changing the grub I still dont have any so I cant use the vfio-pci kernel. Same for my personal computer, but here my mainboard is the problem, since it wont split my IOMMU groups and I cant seperate my networkcard.
Can someone help me to achieve my above mentioned goal? Are there other tools out there, that could easily read and send traffic of a pcap and generate a lots of traffic?
I appreciate every single bit of help.
Sincerely