[dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload

Wiles, Keith keith.wiles at intel.com
Thu Jan 21 16:01:33 CET 2016


On 1/21/16, 12:15 AM, "dev on behalf of Matthew Hall" <dev-bounces at dpdk.org on behalf of mhall at mhcomputing.net> wrote:

>Hello,
>
>I was trying to just use the default PKT file, test/set_seq.pkt, like so:
>
>sudo "./app/app/${RTE_TARGET}/pktgen" \
>-l 2,3 \
>--master-lcore 2 \

BTW, the lowest core will be the master by default in the -c or -l option, so setting master-lcore is not required.
>-n 2 \
>-m 1024 \
>-w 0a:00.1 \
>--no-shconf \
>--file-prefix pktgen \
>-- \
>-P \
>-m 2.0 \
>-f test/set_seq.pkt
>
>After pktgen loaded, the port 0 is marked as UP. So I typed "start all" 
>and also tried "str". Sadly, so far, it seems like I could not get this 
>to actually begin sending any packets. At least, no counters are 
>incrementing in the pktgen UI. So I wasn't sure how to make sure it is 
>really sending or not.

The problem is you used the same core (2) for the -m option. Core 2 is being used for the keyboard, timer and screen output. This means you must have the -m option starting with core 3 as in -m 3.0 and your problem should go away. The first or master core is consume by Pktgen to handle the previous stuff and you must start with the next cores for Rx/Tx of packets. I really need to put tests in the code, which I will try to add soon.

Sorry,
++Keith

>
>The documentation talked about many different commands available, but it 
>didn't specifically say how to start transmitting the packets based on 
>the content of your *.pkt script file.
>
>I'm just trying to figure out what I messed up so that I can write 
>(another) doc patch besides the one I just sent a moment ago.
>
>I was also curious about putting some specific payloads into the packets 
>in pktgen. There are many ways of configuring the packet size, but it 
>doesn't talk about how and where to set the packet content. This is 
>important for my app as its performance will go up and down depending on 
>if the L4-L7 data has "interesting" content inside or not.
>
>Sincerely,
>Matthew.
>


Regards,
Keith






More information about the dev mailing list