From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9777EDE6 for ; Sun, 24 May 2015 02:39:23 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 23 May 2015 17:39:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,484,1427785200"; d="scan'208";a="730823508" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga002.fm.intel.com with ESMTP; 23 May 2015 17:39:22 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.224.2; Sat, 23 May 2015 17:39:22 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.213]) by fmsmsx115.amr.corp.intel.com ([169.254.4.5]) with mapi id 14.03.0224.002; Sat, 23 May 2015 17:39:21 -0700 From: "Wiles, Keith" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] Generating packets into queues Thread-Index: AQHQlZ7DDfkF0X4EpE2XqnfoPwfsu52Ka3iAgAAPuIA= Date: Sun, 24 May 2015 00:39:21 +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.8.67] Content-Type: text/plain; charset="us-ascii" Content-ID: <6FD180856CD47A4B8AB39C375A145CDB@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Generating packets into queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 00:39:24 -0000 On 5/23/15, 7:43 PM, "Wiles, Keith" wrote: > > >On 5/23/15, 5:23 PM, "Jakub Mazur" wrote: > >>Hello, >> >>I've just got to grips with DPDK and started writing my own applications. >>However, I am struggling to figure out how to test my applications in >>terms >>of sending packets to the ports I am polling. >> >>I've got Pktgen-DPDK up and running but I don't know how to use it to >>interact with my own application. > >One possible solution I use and if you have enough ports available to use. >Lets say you need two ports for your application, but you have 4 ports in >your system. I physically loop back the cables to have port 0 connect to >port 2 and port 1 connected to port 3. Now I can give two ports to my >application and two ports to Pktgen. > >Setup if pktgen and your application you have to startup each one a bit >differently to make sure they share the resources like memory and the >ports. I will use two Pktgen running on the same machine, which just means >you have to setup your application as one of the applications. > >In my machine I have 8 10G ports and 72 lcores between 2 sockets. Plus I >have 1024 hugepages per socket for a total of 2048. > >#rkwiles@rkwiles-desk:~/projects/intel/dpdk$ lspci |grep Ether >#06:00.0 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#06:00.1 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#08:00.0 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#08:00.1 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#09:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network >Connection (rev 01) >#09:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network >Connection (rev 01) >#83:00.1 Ethernet controller: Intel Corporation DH8900CC Null Device (rev >21) >#87:00.0 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#87:00.1 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#89:00.0 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) >#89:00.1 Ethernet controller: Intel Corporation Ethernet Converged Network >Adapter X520-Q1 (rev 01) > >./app/app/${target}/pktgen -c ff2 -n 3 --proc-type auto --socket-mem >512,512 --file-prefix pg1 -b 09:00.0 -b 09:00.1 -b 83:00.1 -b 06:00.0 -b >06:00.1 -b 08:00.0 -b 08:00.1 -- -T -P -m "[4:6].0, [5:7].1, [8:10].2, >[9:11].3" -f themes/black-yellow.theme > >./app/app/${target}/pktgen -c ff004 -n 3 --proc-type auto --socket-mem >512,512 --file-prefix pg2 -b 09:00.0 -b 09:00.1 -b 83:00.1 -b 87:00.0 -b >87:00.1 -b 89:00.0 -b 89:00.1 -- -T -P -m "[12:16].0, [13:17].1, >[14:18].2, [15:19].3" -f themes/black-yellow.theme > >Notice I black list the three onboard devices and then black list the >other 4 ports I will not be using for each of the pktgen instances. > >I need 8+1 lcores for each instance for Pktgen use. The -c option of ff2 >and FF004 lcores, the ff value are used for port handling and the 2/4 is >used because pktgen needs the first lcore for display and timers. > >The -m option then assigns lcores to the ports. > >The information from above is taken from two new files pktgen-master.sh >and pktgen-slave.sh, have a look at them and adjust as you need. Pushed a new version of Pktgen 2.9.0 for DPDK 2.1.0 and updated the docs with the above and fixed up some of the old documentation as well. > > > >The other solution is to use two machines with cables connected back to >back, this works if you have a second machine. >> >>Any help would be welcome. >> >>Thanks >