From: Yerden Zhumabekov <e_zhumabekov@sts.kz>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] random pkt generator PMD
Date: Tue, 21 Jun 2016 14:43:13 +0600 [thread overview]
Message-ID: <5768FE21.30904@sts.kz> (raw)
In-Reply-To: <20160615100701.GC10172@bricha3-MOBL3>
I've developed some preliminary version of the driver. The code is
derived from Null PMD, but required a lot of rework.
It uses following devargs to generate packets:
1) edit=offset:size:[rnd|value]
Edit a field within an mbuf packet data with given offset and size.
Mark it as 'rnd' or assign it a hex value, for example:
'edit=8:16:rnd' tags field with offset 8 bytes and with size of 16
bytes random-generated,
'edit=14:4:0xdeadbeef' assigns a specified sequence of bytes to the
field (network byte order).
2) tmpl=name
Use a template with name. Instead of editing data manually, specify
a hard-coded template and then edit only intended fields. Implemented
icmp4, tcp4, but needs to be expanded.
3) size=len
Specify a size of packet. May not be less than size of template
(checked on devinit).
I ran testpmd (start/stop), then l2fwd, looks like it works, but I'd be
happy to hear about additional tests I need to run to ensure the PMD
conformance.
With 64 bytes packet and one 8-byte random field it's about 6-7 Mpps
now. I use rte_rand()/lrand48() as a source of random bytes, it impacts
a performance, but I haven't come up with anything else.
On 15.06.2016 16:07, Bruce Richardson wrote:
> On Wed, Jun 15, 2016 at 04:03:59PM +0600, Yerden Zhumabekov wrote:
>>
>> Right, but development of various features regarding L3/L4 etc requires more
>> subtle approach, like live packets, different protocol versions, fields
>> manipulation. In this case some packet mangling/randomizing capabilities
>> would be quite useful. Something similar to what is done in Pktgen, but more
>> lightweight approach, in a same app.
>>
>> I've almost made my mind :) so the next question: is there any guide on PMD
>> dev? I'm looking through rte_ether.h right now, but some doc would be very
>> nice.
> Unfortunately not. My suggestion is to take one of the simple vdev's e.g. ring,
> pcap, null, and work off a copy of it.
>
> /Bruce
next prev parent reply other threads:[~2016-06-21 8:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 9:43 Yerden Zhumabekov
2016-06-15 9:49 ` Bruce Richardson
2016-06-15 10:03 ` Yerden Zhumabekov
2016-06-15 10:07 ` Bruce Richardson
2016-06-21 8:43 ` Yerden Zhumabekov [this message]
2016-06-15 10:43 ` Dumitrescu, Cristian
2016-06-15 11:10 ` Yerden Zhumabekov
2016-06-15 11:25 ` Panu Matilainen
2016-06-15 12:14 ` Yerden Zhumabekov
2016-06-15 12:24 ` Panu Matilainen
2016-06-15 12:25 ` Dumitrescu, Cristian
2016-06-15 12:54 ` Yerden Zhumabekov
2016-06-15 13:03 ` Dumitrescu, Cristian
2016-06-15 13:30 ` Arnon Warshavsky
2016-06-15 11:25 ` Dumitrescu, Cristian
2016-06-15 12:11 ` Dumitrescu, Cristian
2016-06-15 11:40 ` Thomas Monjalon
2016-06-15 11:48 ` Mcnamara, John
2016-06-15 11:50 ` Jay Rolette
2016-06-15 12:11 ` Yerden Zhumabekov
2016-06-15 12:33 ` Jay Rolette
2016-06-15 12:48 ` Yerden Zhumabekov
2016-06-15 13:02 ` Neil Horman
2016-06-16 6:20 ` Yerden Zhumabekov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5768FE21.30904@sts.kz \
--to=e_zhumabekov@sts.kz \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).