Bug 115 - pktgen panic when using big sized pcap file
Summary: pktgen panic when using big sized pcap file
Status: CONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: other (show other bugs)
Version: 18.11
Hardware: x86 Linux
: Normal major
Target Milestone: ---
Assignee: Amin Latifi
URL:
Depends on:
Blocks:
 
Reported: 2018-12-01 07:45 CET by Amin Latifi
Modified: 2018-12-02 17:25 CET (History)
2 users (show)



Attachments

Description Amin Latifi 2018-12-01 07:45:49 CET
Hi,

I try to send 352MB sized pcap file using pktgen (version 3.5.9), program fail with bellow message:

!PANIC!: Cannot init port 0 for 791615 PCAP packets 0: 0) ( 0: 0) ( 0: 0)


The command used is:
./pktgen -c 0xff -n 3 --socket-mem=512,512 --file-prefix=pg  -w 4:00.1 -- -m 1.0 -T -P -s 0:/var/home/pcap/bigFlows.pcap 

Link to pcap file:
https://s3.amazonaws.com/tcpreplay-pcap-files/bigFlows.pcap
Comment 1 Keith Wiles 2018-12-01 16:34:56 CET
The problem is the PCAP file is bigger than the available memory you allocated to DPDK / Pktgen.

In the latest DPDK 18.11 you can remove the --socket-mem 512,512 and it should run OK. If you need to restrict Pktgen/DPDK to a fixed size of memory then you need to increase the amount of memory you are giving DPDK in the --socket-mem 512,512 option.
Comment 2 Ajit Khaparde 2018-12-01 21:24:34 CET
Amin, please let us know if Keith's suggestion helps. Thanks
Comment 3 Amin Latifi 2018-12-02 07:22:16 CET
(In reply to Ajit Khaparde from comment #2)
> Amin, please let us know if Keith's suggestion helps. Thanks

No, I removed "--socket-mem=512,512" and unfortunately it doesn't help.
Comment 4 Keith Wiles 2018-12-02 17:25:27 CET
I must be the latest change that was made in app/pktgen-pcap.c file.

Please look in that files and locate the '#if 0' that looked at the size of the pcap file and change it back to #if 1 and recompile to see if that fixes the problem.

Note You need to log in before you can comment on or make changes to this bug.