[dpdk-users] Tx/Rx using single ethernet port.

Dharmesh Mehta mehtadharmesh at yahoo.com
Fri May 12 02:52:14 CEST 2017


Hello Keith,
Thank you so much, As per your suggestion- now i can run multiple instance of same application. Issue was, I was not doing black list of unused ports.
Once again, thanks for your help.
Regards,D.



      From: "Wiles, Keith" <keith.wiles at intel.com>
 To: Dharmesh Mehta <mehtadharmesh at yahoo.com> 
Cc: "users at dpdk.org" <users at dpdk.org>
 Sent: Thursday, May 11, 2017 7:39 AM
 Subject: Re: [dpdk-users] Tx/Rx using single ethernet port.
   

> On May 11, 2017, at 12:55 AM, Dharmesh Mehta <mehtadharmesh at yahoo.com> wrote:
> 
> Hello,
> I am new to DPDK world, and looking for any working example  to do tx/rx on single ethernet port. Also please include what arguments are required in order to run.
> Is it possible to run multiple instance of same application? I wrote one app, which sens data (verified on wireshark),  but when i try to run second instance of same app, my first instance of same app  stop sending data. I am passing different name using --file-prefix to the both instances app. Any help is really appreciated.
> ThxD.

Running two instance or more you have to split up the resources like lcores, ports, memory and the file-prefix. Make sure you have enough memory setup to run two instances. If your app needs 32 huge pages then make sure you have 64 huge pages allocated. Set the —file-prefix different for each instance. Make sure you use the -m <memSize> or —socket-mem options to limit the amount of memory each instance consumes. Make sure you blacklist/whitelist the ports correctly to give a port(s) to each instance. Then make sure you use different cores for each instance.

In Pktgen I have two scripts I use to run two instances. Here are the scripts called pktgen-master.sh and pktgen-slave.sh

pktgen-master.sh
————————
dpdk_opts="-l 8-16 -n 4 --proc-type auto --log-level 7 --socket-mem 512,512 --file-prefix pg1"
pktgen_opts="-T -P"
port_map="-m [9:10].0 -m [11:12].1 -m [13:14].2 -m [15:16].3"
bl_common="-b 05:00.0 -b 05:00.1 -b 82:00.0 -b 83:00.0"
black_list="${bl_common} -b 81:00.0 -b 81:00.1 -b 81:00.2 -b 81:00.3"
load_file="-f themes/black-yellow.theme"

echo ${cmd} ${dpdk_opts} ${black_list} -- ${pktgen_opts} ${port_map} ${load_file}
sudo ${cmd} ${dpdk_opts} ${black_list} -- ${pktgen_opts} ${port_map} ${load_file}


pktgen-slave.sh
———————
dpdk_opts="-l 18-26 -n 4 --proc-type auto --log-level 7 --socket-mem 512,512 --file-prefix pg2"
pktgen_opts="-T -P"
port_map="-m [19:20].0 -m [21:22].1 -m [23:24].2 -m [25:26].3"
bl_common="-b 05:00.0 -b 05:00.1 -b 82:00.0 -b 83:00.0"
black_list="${bl_common} -b 04:00.0 -b 04:00.1 -b 04:00.2 -b 04:00.3"
load_file="-f themes/black-yellow.theme"

echo ${cmd} ${dpdk_opts} ${black_list} -- ${pktgen_opts} ${port_map} ${load_file}
sudo ${cmd} ${dpdk_opts} ${black_list} -- ${pktgen_opts} ${port_map} ${load_file}


Regards,
Keith



   


More information about the users mailing list