DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Generating packets into queues
Date: Sun, 24 May 2015 00:39:21 +0000	[thread overview]
Message-ID: <D18695A6.20DD3%keith.wiles@intel.com> (raw)
In-Reply-To: <D1866A52.20CCB%keith.wiles@intel.com>



On 5/23/15, 7:43 PM, "Wiles, Keith" <keith.wiles@intel.com> wrote:

>
>
>On 5/23/15, 5:23 PM, "Jakub Mazur" <jakub.mazur103@gmail.com> 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
>

      reply	other threads:[~2015-05-24  0:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23 21:23 Jakub Mazur
2015-05-23 23:43 ` Wiles, Keith
2015-05-24  0:39   ` Wiles, Keith [this message]

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=D18695A6.20DD3%keith.wiles@intel.com \
    --to=keith.wiles@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).