DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Generating packets into queues
@ 2015-05-23 21:23 Jakub Mazur
  2015-05-23 23:43 ` Wiles, Keith
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Mazur @ 2015-05-23 21:23 UTC (permalink / raw)
  To: dev

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.

Any help would be welcome.

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] Generating packets into queues
  2015-05-23 21:23 [dpdk-dev] Generating packets into queues Jakub Mazur
@ 2015-05-23 23:43 ` Wiles, Keith
  2015-05-24  0:39   ` Wiles, Keith
  0 siblings, 1 reply; 3+ messages in thread
From: Wiles, Keith @ 2015-05-23 23:43 UTC (permalink / raw)
  To: Jakub Mazur, dev



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.



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] Generating packets into queues
  2015-05-23 23:43 ` Wiles, Keith
@ 2015-05-24  0:39   ` Wiles, Keith
  0 siblings, 0 replies; 3+ messages in thread
From: Wiles, Keith @ 2015-05-24  0:39 UTC (permalink / raw)
  To: dev



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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-24  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-23 21:23 [dpdk-dev] Generating packets into queues Jakub Mazur
2015-05-23 23:43 ` Wiles, Keith
2015-05-24  0:39   ` Wiles, Keith

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).