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, &params);
inq_def = odp_queue_create(inq_name, ODP_QUEUE_TYPE_PKTIN, &qparam);
ret = odp_pktio_inq_setdef(pktio, inq_def);

Create IPC queue:
/* here simple assign packet I/O to pool */
pktio_ipc_params.type = ODP_PKTIO_TYPE_IPC;
pktio_ipc = odp_pktio_open(NULL, pkt_pool, &pktio_ipc_params); // dev is NULL
/* create some shared queue */
ipcq_def = odp_queue_create("shared-queue", ODP_QUEUE_TYPE_IPC, &qparam);
/* set up queue method */
ret = odp_pktio_inq_setdef(pktio_ipc, ipcq_def);

/* loop to get buffer from inq_def and it to ipcq_def */

    for (;;) {
        buf = odp_schedule(NULL, ODP_SCHED_WAIT);
         odp_queue_enq(ipcq_def, buf);
   }

2. Process two:
/* Here queue checks if it was created before, then attach to it. Look up is done by name. */
ipcq_def = odp_queue_create("shared-queue", ODP_QUEUE_TYPE_IPC, &qparam);

ret = odp_pktio_inq_setdef(pktio_ipc, ipcq_def);

/* look for packets in ipcq_def */
while (1) {
            buf = odp_queue_deq(ipcq_def);
            odp_buffer_free(buf);
}

Is that the same what we are talked about?

Thank you,
Maxim.

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to