Hi All,

ODP API reference manual states that API odp_queue_deq cannot be used with 
queue of type ODP_QUEUE_TYPE_SCHED, Which is logical as queue is already 
scheduled so we need to call odp_schedule for these type of queues.

In contrast with above statement ODP IPSEC example application creates 
completion queue\device default in queue in schedule mode and later in the 
pktio thread calls odp_queue_deq for those queues.

Following is the code snippet from ODP IPSEC application:

Main()
{
.........
.........
        completionq = QUEUE_CREATE("completion",
                                   ODP_QUEUE_TYPE_SCHED,
                                   &qparam);
.........
}

QUEUE_CREATE()
{
..........
..........
        if ((ODP_QUEUE_TYPE_SCHED == type) || (ODP_QUEUE_TYPE_PKTIN == type)) {
                poll_queues[num_polled_queues++] = my_queue;
                printf("%s: adding %d\n", __func__, my_queue);
        }
..........
}
Polled_odp_schedule()
{
......................
....................
                for (idx = 0; idx < num_polled_queues; idx++) {
                        odp_queue_t queue = poll_queues[idx];
                        odp_buffer_t buf;

                        buf = odp_queue_deq(queue);
...................
...................

}


Please clarify.

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

Reply via email to