[dpdk-dev] Generating packets into queues

Wiles, Keith keith.wiles at intel.com
Sun May 24 02:39:21 CEST 2015



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

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



More information about the dev mailing list