DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
@ 2016-01-21  6:15 Matthew Hall
  2016-01-21 15:01 ` Wiles, Keith
  2016-01-21 15:05 ` Wiles, Keith
  0 siblings, 2 replies; 7+ messages in thread
From: Matthew Hall @ 2016-01-21  6:15 UTC (permalink / raw)
  To: dev

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 \
-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 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21  6:15 [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload Matthew Hall
@ 2016-01-21 15:01 ` Wiles, Keith
  2016-01-21 19:01   ` Matthew Hall
  2016-01-21 15:05 ` Wiles, Keith
  1 sibling, 1 reply; 7+ messages in thread
From: Wiles, Keith @ 2016-01-21 15:01 UTC (permalink / raw)
  To: Matthew Hall, dev

On 1/21/16, 12:15 AM, "dev on behalf of Matthew Hall" <dev-bounces@dpdk.org on behalf of mhall@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21  6:15 [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload Matthew Hall
  2016-01-21 15:01 ` Wiles, Keith
@ 2016-01-21 15:05 ` Wiles, Keith
  2016-01-21 19:00   ` Matthew Hall
  1 sibling, 1 reply; 7+ messages in thread
From: Wiles, Keith @ 2016-01-21 15:05 UTC (permalink / raw)
  To: Matthew Hall, dev

On 1/21/16, 12:15 AM, "dev on behalf of Matthew Hall" <dev-bounces@dpdk.org on behalf of mhall@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 \
>-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 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.

Forgot to answer this one. Pktgen does not allow the user to define the content of the packet per say only the fill pattern and what ever you configure the packet type to be. If you would like to submit a patch for adding user specific content it has always been a goal of my to add that feature.

>
>Sincerely,
>Matthew.
>


Regards,
Keith





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21 15:05 ` Wiles, Keith
@ 2016-01-21 19:00   ` Matthew Hall
  2016-01-21 19:44     ` Wiles, Keith
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Hall @ 2016-01-21 19:00 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

On Thu, Jan 21, 2016 at 03:05:38PM +0000, Wiles, Keith wrote:
> Forgot to answer this one. Pktgen does not allow the user to define the 
> content of the packet per say only the fill pattern and what ever you 
> configure the packet type to be. If you would like to submit a patch for 
> adding user specific content it has always been a goal of my to add that 
> feature.

I am happy to work to make the patch, it would help if you could provide some 
hints where in the code I should look... when I went searching for seqCnt I 
found a packet-constructor function run in a loop when applying a 
packet-sequence operation. Is the packet-constructor the right place or should 
I look somewhere else?

Matthew.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21 15:01 ` Wiles, Keith
@ 2016-01-21 19:01   ` Matthew Hall
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Hall @ 2016-01-21 19:01 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

On Thu, Jan 21, 2016 at 03:01:33PM +0000, Wiles, Keith wrote:
> 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.

I'll see if I can figure out some patches for that.

Matthew.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21 19:00   ` Matthew Hall
@ 2016-01-21 19:44     ` Wiles, Keith
  2016-01-21 20:09       ` Matthew Hall
  0 siblings, 1 reply; 7+ messages in thread
From: Wiles, Keith @ 2016-01-21 19:44 UTC (permalink / raw)
  To: Matthew Hall; +Cc: dev

On 1/21/16, 1:00 PM, "Matthew Hall" <mhall@mhcomputing.net> wrote:

>On Thu, Jan 21, 2016 at 03:05:38PM +0000, Wiles, Keith wrote:
>> Forgot to answer this one. Pktgen does not allow the user to define the 
>> content of the packet per say only the fill pattern and what ever you 
>> configure the packet type to be. If you would like to submit a patch for 
>> adding user specific content it has always been a goal of my to add that 
>> feature.
>
>I am happy to work to make the patch, it would help if you could provide some 
>hints where in the code I should look... when I went searching for seqCnt I 
>found a packet-constructor function run in a loop when applying a 
>packet-sequence operation. Is the packet-constructor the right place or should 
>I look somewhere else?

The packet-constructor builds the different types single, range, sequence and PCAP packets, before the packets are sent.

What type of data do you want to add to the packets? Now it builds IPv4/UDP/TCP packets, do you need to replace UDP or TCP or just add more protocol layers?
>
>Matthew.
>


Regards,
Keith





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload
  2016-01-21 19:44     ` Wiles, Keith
@ 2016-01-21 20:09       ` Matthew Hall
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Hall @ 2016-01-21 20:09 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

On Thu, Jan 21, 2016 at 07:44:21PM +0000, Wiles, Keith wrote:
> What type of data do you want to add to the packets? Now it builds 
> IPv4/UDP/TCP packets, do you need to replace UDP or TCP or just add more 
> protocol layers?

I perform content inspection of various types:

IPv4 - supported
IPv6 - supported
TCP - supported
UDP - supported
DNS - need custom binary payload
sFlow - need custom binary payload
Netflow - need custom sequence (supported) and custom binary payload
UDP Syslog - need custom ASCII payload (binary would of course work)

TCP Syslog - need custom ASCII payload (probably impossible w/ this tool as a 
three-way handshake is needed for me to begin receiving in the app, which is 
among other things a high performance Syslog digester, but UDP is enough for 
now)

Because it's a security app I have to model things like "99% boring, 1% 
interesting" as packets which raise alerts cost more resources than packets 
which do not.

Matthew.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-21 20:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21  6:15 [dpdk-dev] [PKTGEN] dumb question: how to start packet TX and set the payload Matthew Hall
2016-01-21 15:01 ` Wiles, Keith
2016-01-21 19:01   ` Matthew Hall
2016-01-21 15:05 ` Wiles, Keith
2016-01-21 19:00   ` Matthew Hall
2016-01-21 19:44     ` Wiles, Keith
2016-01-21 20:09       ` Matthew Hall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).