DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Why we need [MASTER] in DPDK Pipeline
@ 2016-03-23 15:51 Royce Niu
  2016-03-23 20:06 ` Singh, Jasvinder
  0 siblings, 1 reply; 4+ messages in thread
From: Royce Niu @ 2016-03-23 15:51 UTC (permalink / raw)
  To: users

Dear all,

I am using DPDK Pipeline to build a Firewall. I found assign a core to
MASTER. Could you please tell me why we need MASTER? and why MASTER need a
dedicated core ? since I meet error to bind MASTER and Firewall to same
core.

Thanks!

-- 
Regards,

Royce Niu

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

* Re: [dpdk-users] Why we need [MASTER] in DPDK Pipeline
  2016-03-23 15:51 [dpdk-users] Why we need [MASTER] in DPDK Pipeline Royce Niu
@ 2016-03-23 20:06 ` Singh, Jasvinder
  2016-03-24  7:16   ` Royce Niu
  0 siblings, 1 reply; 4+ messages in thread
From: Singh, Jasvinder @ 2016-03-23 20:06 UTC (permalink / raw)
  To: Royce Niu, users

Hi Royce,

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Royce Niu
> Sent: Wednesday, March 23, 2016 3:51 PM
> To: users@dpdk.org
> Subject: [dpdk-users] Why we need [MASTER] in DPDK Pipeline
> 
> Dear all,
> 
> I am using DPDK Pipeline to build a Firewall. I found assign a core to MASTER.
> Could you please tell me why we need MASTER? and why MASTER need a
> dedicated core ? since I meet error to bind MASTER and Firewall to same
> core.
> 

Master pipeline, basically is a management thread that allow users to interact and manage ip-pipeline application during run time. It offers CLI to configure ports, collecting stats, add/remove table entries, loading rules files, displaying rules, quit etc. Therefore, the master pipeline receives inputs from the user, translates them into formal command and forwards command to the desired pipeline (data plane thread). The packet processing pipeline which is continuously working on the packets periodically checks whether there is any command to handle or not, and execute them accordingly if there is any. In addition to this, master pipeline also maintains a copy of all the tables used in pipelines. If user wants to inspect the rules, master pipeline will display them without interrupting data plane thread. 

Now, if anyone don't want to assign dedicated core to master pipeline, then it should also work. However, a slight impact on the performance may be visible depending the commands being run.

In your case, you can bind both master and firewall pipelines to single core and they should work correctly.

Thanks.

Regards,
Jasvinder

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

* Re: [dpdk-users] Why we need [MASTER] in DPDK Pipeline
  2016-03-23 20:06 ` Singh, Jasvinder
@ 2016-03-24  7:16   ` Royce Niu
  2016-03-24 15:22     ` Singh, Jasvinder
  0 siblings, 1 reply; 4+ messages in thread
From: Royce Niu @ 2016-03-24  7:16 UTC (permalink / raw)
  To: Singh, Jasvinder; +Cc: Royce Niu, users

Thanks! Your explanation is quite clear.

But, we I assign one core to VM and use this one core to start the
pipeline. It shows :

sudo ./build/ip_pipeline -f l2fwd.cfg -p 0x6
[APP] Initializing CPU core map ...
PANIC in app_init_core_map():
Cannot create CPU core map
6: [./build/ip_pipeline() [0x431b43]]
5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)
[0x7efdd5090ec5]]
4: [./build/ip_pipeline(main+0x5f) [0x4306ff]]
3: [./build/ip_pipeline(app_init+0x14fb) [0x43f7ab]]
2: [./build/ip_pipeline(__rte_panic+0xc9) [0x42b11a]]
1: [./build/ip_pipeline(rte_dump_stack+0x1a) [0x4c9fba]]


The config is :


[PIPELINE0]
type = MASTER
core = 0

[PIPELINE1]
type = PASS-THROUGH
core = 0
pktq_in = RXQ0.0 RXQ1.0
pktq_out = TXQ1.0 TXQ0.0



The VM start cmd is :
sudo taskset 0x10 ./qemu-system-x86_64* -enable-kvm -cpu host -m 1024M -smp
sockets=1,cores=1* -netdev tap,id=hostnet0 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5e:cc:f0
/trunk/template.img -chardev socket,id=char0,path=/tmp/sn_vhost_vh0 -netdev
type=vhost-user,id=mynet0,chardev=char0,vhostforce -device
virtio-net-pci,netdev=mynet0,mac=52:54:00:02:d9:00 -chardev
socket,id=char1,path=/tmp/sn_vhost_vh1 -netdev
type=vhost-user,id=mynet1,chardev=char1,vhostforce -device
virtio-net-pci,netdev=mynet1,mac=52:54:00:02:d9:01 -object
memory-backend-file,id=mem,size=1024M,mem-path=/dev/hugepages,share=on
-numa node,memdev=mem -mem-prealloc -chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0


However, when I assign two vCPUs to the VM and assign P0 and P1 in
different vCPU. Everything is right.










On Thu, Mar 24, 2016 at 4:06 AM, Singh, Jasvinder <jasvinder.singh@intel.com
> wrote:

> Hi Royce,
>
> > -----Original Message-----
> > From: users [mailto:users-bounces@dpdk.org] On Behalf Of Royce Niu
> > Sent: Wednesday, March 23, 2016 3:51 PM
> > To: users@dpdk.org
> > Subject: [dpdk-users] Why we need [MASTER] in DPDK Pipeline
> >
> > Dear all,
> >
> > I am using DPDK Pipeline to build a Firewall. I found assign a core to
> MASTER.
> > Could you please tell me why we need MASTER? and why MASTER need a
> > dedicated core ? since I meet error to bind MASTER and Firewall to same
> > core.
> >
>
> Master pipeline, basically is a management thread that allow users to
> interact and manage ip-pipeline application during run time. It offers CLI
> to configure ports, collecting stats, add/remove table entries, loading
> rules files, displaying rules, quit etc. Therefore, the master pipeline
> receives inputs from the user, translates them into formal command and
> forwards command to the desired pipeline (data plane thread). The packet
> processing pipeline which is continuously working on the packets
> periodically checks whether there is any command to handle or not, and
> execute them accordingly if there is any. In addition to this, master
> pipeline also maintains a copy of all the tables used in pipelines. If user
> wants to inspect the rules, master pipeline will display them without
> interrupting data plane thread.
>
> Now, if anyone don't want to assign dedicated core to master pipeline,
> then it should also work. However, a slight impact on the performance may
> be visible depending the commands being run.
>
> In your case, you can bind both master and firewall pipelines to single
> core and they should work correctly.
>
> Thanks.
>
> Regards,
> Jasvinder
>



-- 
Regards,

Royce Niu

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

* Re: [dpdk-users] Why we need [MASTER] in DPDK Pipeline
  2016-03-24  7:16   ` Royce Niu
@ 2016-03-24 15:22     ` Singh, Jasvinder
  0 siblings, 0 replies; 4+ messages in thread
From: Singh, Jasvinder @ 2016-03-24 15:22 UTC (permalink / raw)
  To: Royce Niu; +Cc: users

Hi,

From: Royce Niu [mailto:royceniu@gmail.com]
Sent: Thursday, March 24, 2016 7:16 AM
To: Singh, Jasvinder <jasvinder.singh@intel.com>
Cc: Royce Niu <royceniu@gmail.com>; users@dpdk.org
Subject: Re: [dpdk-users] Why we need [MASTER] in DPDK Pipeline

Thanks! Your explanation is quite clear.

But, we I assign one core to VM and use this one core to start the pipeline. It shows :

sudo ./build/ip_pipeline -f l2fwd.cfg -p 0x6
[APP] Initializing CPU core map ...
PANIC in app_init_core_map():
Cannot create CPU core map
6: [./build/ip_pipeline() [0x431b43]]
5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7efdd5090ec5]]
4: [./build/ip_pipeline(main+0x5f) [0x4306ff]]
3: [./build/ip_pipeline(app_init+0x14fb) [0x43f7ab]]
2: [./build/ip_pipeline(__rte_panic+0xc9) [0x42b11a]]
1: [./build/ip_pipeline(rte_dump_stack+0x1a) [0x4c9fba]]


The config is :


[PIPELINE0]
type = MASTER
core = 0

[PIPELINE1]
type = PASS-THROUGH
core = 0
pktq_in = RXQ0.0 RXQ1.0
pktq_out = TXQ1.0 TXQ0.0



The VM start cmd is :
sudo taskset 0x10 ./qemu-system-x86_64 -enable-kvm -cpu host -m 1024M -smp sockets=1,cores=1 -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5e:cc:f0 /trunk/template.img -chardev socket,id=char0,path=/tmp/sn_vhost_vh0 -netdev type=vhost-user,id=mynet0,chardev=char0,vhostforce -device virtio-net-pci,netdev=mynet0,mac=52:54:00:02:d9:00 -chardev socket,id=char1,path=/tmp/sn_vhost_vh1 -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce -device virtio-net-pci,netdev=mynet1,mac=52:54:00:02:d9:01 -object memory-backend-file,id=mem,size=1024M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem -mem-prealloc -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0


However, when I assign two vCPUs to the VM and assign P0 and P1 in different vCPU. Everything is right.


I tried running using single core on physical host and it worked. On VM,  there shouldn't be any problem too. Perhaps something is missing in qemu system parameters settings.

Jasvinder

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

end of thread, other threads:[~2016-03-24 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 15:51 [dpdk-users] Why we need [MASTER] in DPDK Pipeline Royce Niu
2016-03-23 20:06 ` Singh, Jasvinder
2016-03-24  7:16   ` Royce Niu
2016-03-24 15:22     ` Singh, Jasvinder

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