@@ -518,7 +518,7 @@ bool verify_stream_db_outputs(void)
int idx;
int count;
odp_queue_t queue;
- odp_buffer_t buf_tbl[LOOP_DEQ_COUNT];
+ odp_event_t ev_tbl[LOOP_DEQ_COUNT];
queue = query_loopback_db_outq(stream->output.loop);
@@ -528,13 +528,11 @@ bool verify_stream_db_outputs(void)
for (;;) {
#if LOOP_DEQ_MULTIPLE
count = odp_queue_deq_multi(queue,
- buf_tbl,
+ ev_tbl,
LOOP_DEQ_COUNT);
#else
- odp_event_t ev;
- ev = odp_queue_deq(queue);
- buf_tbl[0] = odp_buffer_from_event(ev);
- count = (buf_tbl[0] != ODP_BUFFER_INVALID) ? 1 : 0;
+ ev_tbl[0] = odp_queue_deq(queue);
+ count = (ev_tbl[0] != ODP_EVENT_INVALID) ? 1 : 0;
#endif
if (!count)
break;
@@ -542,7 +540,7 @@ bool verify_stream_db_outputs(void)
bool good;
odp_packet_t pkt;
- pkt = odp_packet_from_buffer(buf_tbl[idx]);
+ pkt = odp_packet_from_event(ev_tbl[idx]);
good = verify_ipv4_packet(stream, pkt);
if (good)
@@ -20,7 +20,7 @@ extern "C" {
#include <odp_std_types.h>
-#include <odp_buffer.h>
+#include <odp_platform_types.h>
/** @defgroup odp_queue ODP QUEUE
* Macros and operation on a queue.
@@ -204,18 +204,18 @@ int odp_queue_enq_multi(odp_queue_t queue, odp_event_t ev[], int num);
odp_event_t odp_queue_deq(odp_queue_t queue);
/**
- * Dequeue multiple buffers from a queue
+ * Dequeue multiple events from a queue
*
- * Dequeues multiple buffers from head of the queue. Cannot be used for
+ * Dequeues multiple events from head of the queue. Cannot be used for
* ODP_QUEUE_TYPE_SCHED type queues (use odp_schedule() instead).
*
* @param queue Queue handle
- * @param buf Buffer handles for output
- * @param num Maximum number of buffer handles
+ * @param events Event handle array for output
+ * @param num Maximum number of event handles
- * @return Number of buffers written (0 ... num)
+ * @return Number of events written (0 ... num)
*/
-int odp_queue_deq_multi(odp_queue_t queue, odp_buffer_t buf[], int num);
+int odp_queue_deq_multi(odp_queue_t queue, odp_event_t events[], int num);
/**
* Queue type
@@ -494,7 +494,7 @@ int queue_deq_multi_destroy(queue_entry_t *queue,
return 0;
}
-int odp_queue_deq_multi(odp_queue_t handle, odp_buffer_t buf[], int num)
+int odp_queue_deq_multi(odp_queue_t handle, odp_event_t events[], int num)
{
queue_entry_t *queue;
odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX];
@@ -508,7 +508,7 @@ int odp_queue_deq_multi(odp_queue_t handle, odp_buffer_t buf[], int num)
ret = queue->s.dequeue_multi(queue, buf_hdr, num);
for (i = 0; i < ret; i++)
- buf[i] = buf_hdr[i]->handle.handle;
+ events[i] = odp_buffer_to_event(buf_hdr[i]->handle.handle);
return ret;
}
@@ -289,7 +289,7 @@ static int schedule(odp_queue_t *out_queue, odp_buffer_t out_buf[],
queue = desc->queue;
num = odp_queue_deq_multi(queue,
- sched_local.buf,
+ (odp_event_t *)sched_local.buf,
max_deq);
if (num == 0) {
Changed odp_queue_deq_multi() to use events instead of buffers. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- example/ipsec/odp_ipsec_stream.c | 12 +++++------- platform/linux-generic/include/api/odp_queue.h | 14 +++++++------- platform/linux-generic/odp_queue.c | 4 ++-- platform/linux-generic/odp_schedule.c | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-)