Re: [lng-odp] odp ipc api

2014-08-26 Thread Maxim Uvarov
On 08/26/2014 04:21 PM, Bala Manoharan wrote: Hi, Few points from my side, 1. We are creating pktio and then assigning the created queue to the pktio. IMO we should abstract the PKTIO, since it is up to the implementation to either support IPC through dummy interface or shared memory. Lets s

Re: [lng-odp] odp ipc api

2014-08-26 Thread Bala Manoharan
Thanks for bringing it up Mike. One queue per process is still kept as a question in the document. If we agree we need to update the document. Regards, Bala On 26 August 2014 17:58, Mike Holmes wrote: > > > > On 26 August 2014 08:21, Bala Manoharan wrote: > >> Hi, >> >> Few points from my sid

Re: [lng-odp] odp ipc api

2014-08-26 Thread Mike Holmes
On 26 August 2014 08:21, Bala Manoharan wrote: > Hi, > > Few points from my side, > > 1. We are creating pktio and then assigning the created queue to the > pktio. IMO we should abstract the PKTIO, since it is up to the > implementation to either support IPC through dummy interface or shared > me

Re: [lng-odp] odp ipc api

2014-08-26 Thread Bala Manoharan
Hi, Few points from my side, 1. We are creating pktio and then assigning the created queue to the pktio. IMO we should abstract the PKTIO, since it is up to the implementation to either support IPC through dummy interface or shared memory. Lets say if an implementation does IPC through shared mem

Re: [lng-odp] odp ipc api

2014-08-26 Thread Ola Liljedahl
Sharing queues between threads that share memory is not a big problem. But sharing queues between different programs/processes which do not want to share memory (e.g. between a control plane program and one or several dataplane applications) is a problem. It is not just the lookup of the queue iden

Re: [lng-odp] odp ipc api

2014-08-26 Thread Maxim Uvarov
On 08/26/2014 03:13 PM, Ola Liljedahl wrote: Possibly we are missing a public API for looking up a queue (or perhaps specifically an IPC queue) by name. If you have two threads (in same or different processes) that first try to look up an (IPC or global) queue by name and if this fails then c

Re: [lng-odp] odp ipc api

2014-08-26 Thread Ola Liljedahl
Possibly we are missing a public API for looking up a queue (or perhaps specifically an IPC queue) by name. If you have two threads (in same or different processes) that first try to look up an (IPC or global) queue by name and if this fails then creates said IPC queue, you have introduced a race

Re: [lng-odp] odp ipc api

2014-08-26 Thread Maxim Uvarov
On 08/26/2014 12:56 PM, Taras Kondratiuk wrote: On 08/25/2014 05:37 PM, Maxim Uvarov wrote: I pushed here some raw code: https://git.linaro.org/people/maxim.uvarov/odp.git/shortlog/refs/heads/odp_ipc2 Example here app here: https://git.linaro.org/people/maxim.uvarov/odp.git/blob/refs/heads/

Re: [lng-odp] odp ipc api

2014-08-26 Thread Taras Kondratiuk
On 08/25/2014 05:37 PM, Maxim Uvarov wrote: I pushed here some raw code: https://git.linaro.org/people/maxim.uvarov/odp.git/shortlog/refs/heads/odp_ipc2 Example here app here: https://git.linaro.org/people/maxim.uvarov/odp.git/blob/refs/heads/odp_ipc2:/example/fork/odp_fork.c pktio_queue_thre

Re: [lng-odp] odp ipc api

2014-08-25 Thread Maxim Uvarov
I pushed here some raw code: https://git.linaro.org/people/maxim.uvarov/odp.git/shortlog/refs/heads/odp_ipc2 Example here app here: https://git.linaro.org/people/maxim.uvarov/odp.git/blob/refs/heads/odp_ipc2:/example/fork/odp_fork.c pktio_queue_thread() takes packets from inq queue and put them

[lng-odp] odp ipc api

2014-08-21 Thread Maxim Uvarov
Taras, I want to check with you that you will be fine with following api for ipc app: 1. Process one: Create standard ingress queue: pktio = odp_pktio_open(thr_args->pktio_dev, pkt_pool, ¶ms); inq_def = odp_queue_create(inq_name, ODP_QUEUE_TYPE_PKTIN, &qparam); ret = odp_pktio_inq_setdef(pkti