From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E88F35A44 for ; Tue, 9 May 2017 15:56:46 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2017 06:56:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,314,1491289200"; d="scan'208";a="259000965" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 09 May 2017 06:56:45 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 May 2017 06:56:45 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.235]) by fmsmsx115.amr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Tue, 9 May 2017 06:56:45 -0700 From: "Wiles, Keith" To: James Bensley CC: "users@dpdk.org" Thread-Topic: [dpdk-users] PktGen Ethertype Thread-Index: AQHSyKIuIPObLZ7csU+T+epq1ISjxqHsfEMA Date: Tue, 9 May 2017 13:56:44 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.44.65] Content-Type: text/plain; charset="us-ascii" Content-ID: <1B2632222C845643B2E42C15711AF98D@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] PktGen Ethertype X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 13:56:47 -0000 > On May 9, 2017, at 3:55 AM, James Bensley wrote: >=20 > Hi All, >=20 > I hope this is a suitable place to ask, if not please point me at > somewhere more appropriate. >=20 > 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. >=20 > 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? >=20 > // Build an entire frame then just loop over the ethertype for each frame= : >=20 > build_entire_frame_with_payload(); >=20 > for (i =3D 0; i <=3D 0xFFFF; i++) { >=20 > pktgen.set_eth_type(i); > send_frame(); > } Yes this would be nice, but at this point pktgen is not able to do this typ= e 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 thos= e 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 numbe= r 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= :-) >=20 > Cheers, > James. Regards, Keith