[dpdk-users] PktGen Ethertype

Wiles, Keith keith.wiles at intel.com
Tue May 9 15:56:44 CEST 2017

> On May 9, 2017, at 3:55 AM, James Bensley <jwbensley at gmail.com> wrote:
> Hi All,
> I hope this is a suitable place to ask, if not please point me at
> somewhere more appropriate.
> I've been reading through the Pktgen docs
> (http://pktgen.readthedocs.io/en/latest/commands.html for example) and
> I'm trying to find out if I can set the EtherType field in the layer 2
> headers to any value I like. I can't seem to find anything on this.
> I want to use some Lua scripts to generate traffic with every possible
> EtherType (from 0x0000 to 0xFFFF) and send that through a switch and
> test that all frames were received on the other side. Is there a
> function like pktgen.set_eth_type() so I can wrap it in loop?
> // Build an entire frame then just loop over the ethertype for each frame:
> build_entire_frame_with_payload();
> for (i = 0; i <= 0xFFFF; i++) {
>    pktgen.set_eth_type(i);
>    send_frame();
> }

Yes this would be nice, but at this point pktgen is not able to do this type of feature.
This would be a nice feature for scripting, I have not had time to add that support :-(

The range command can allow you to adjust the type field and then send those in a burst. The problem is pktgen was designed to send packets at a high rate if needed and that means setting up the packets before hand. The number of packets being able to be setup before hand is 8192. The random command can adjust the ether type randomly for each packet with a performance hit. Maybe one of these would help. Also I am more then willing to take patches :-)

> Cheers,
> James.


More information about the users mailing list