diff options
author | Ola Liljedahl <ola.liljedahl@linaro.org> | 2015-02-03 17:48:14 +0100 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-02-04 19:54:00 +0300 |
commit | 9d081e251e62206c6eb42d7bf45d6d0463d48810 (patch) | |
tree | 5f5c19984af4b528a6cd659332735a97e3387f1a /test/performance/odp_scheduling.c | |
parent | dfb93e7d0c5d8d16b618872fd66761ca92eee20b (diff) |
api: odp_queue.h: odp_queue_enq_multi() returns partial success
Changed the definition of odp_queue_enq_multi() to support partial
success (e.g. enqueued some but not all of the events specified).
Returns the number of events enqueued (equivalent to
odp_queue_deq_multi()). This change is necessary to support ODP
implementations that use fixed size queues (e.g. ODP linux-dpdk).
Updated the implementation in odp_queue.c to conform to the new
semantics.
Updated the necessary test/validation/performance programs.
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_scheduling.c')
-rw-r--r-- | test/performance/odp_scheduling.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 3d7167f47..98c060e6c 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -526,7 +526,9 @@ static int test_schedule_multi(const char *str, int thr, ev[j] = odp_buffer_to_event(buf); } - if (odp_queue_enq_multi(queue, ev, MULTI_BUFS_MAX)) { + /* Assume we can enqueue all events */ + if (odp_queue_enq_multi(queue, ev, MULTI_BUFS_MAX) != + MULTI_BUFS_MAX) { LOG_ERR(" [%i] Queue enqueue failed.\n", thr); return -1; } @@ -541,7 +543,8 @@ static int test_schedule_multi(const char *str, int thr, tot += num; - if (odp_queue_enq_multi(queue, ev, num)) { + /* Assume we can enqueue all events */ + if (odp_queue_enq_multi(queue, ev, num) != num) { LOG_ERR(" [%i] Queue enqueue failed.\n", thr); return -1; } @@ -559,7 +562,8 @@ static int test_schedule_multi(const char *str, int thr, tot += num; - if (odp_queue_enq_multi(queue, ev, num)) { + /* Assume we can enqueue all events */ + if (odp_queue_enq_multi(queue, ev, num) != num) { LOG_ERR(" [%i] Queue enqueue failed.\n", thr); return -1; } |