This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 6e213fbae7f16558e572da39704927f107c01f80 (commit) via cc453ca9fc04f370c3af28d4366c49d5f07bec32 (commit) via 448629199c4b50d5dd22be946b8c0d963479a3f3 (commit) from 1e47fa70c2eeb3d2f3805af28a00476c7284ef24 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 6e213fbae7f16558e572da39704927f107c01f80 Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Feb 15 14:54:35 2018 +0200
validation: cls: test cos_num_queue and cos_queues
Added single queue tests for cos_num_queue and cos_queues. This way functions are called at least once from validation test suite.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/classification/odp_classification_basic.c b/test/validation/api/classification/odp_classification_basic.c index c31a7530..20f07374 100644 --- a/test/validation/api/classification/odp_classification_basic.c +++ b/test/validation/api/classification/odp_classification_basic.c @@ -149,6 +149,7 @@ void classification_test_cos_set_queue(void) odp_queue_t queue_cos; odp_cos_t cos_queue; odp_queue_t recvqueue; + odp_queue_t queue_out = ODP_QUEUE_INVALID;
pool = pool_create("cls_basic_pool"); CU_ASSERT_FATAL(pool != ODP_POOL_INVALID); @@ -171,6 +172,9 @@ void classification_test_cos_set_queue(void) CU_ASSERT(retval == 0); recvqueue = odp_cos_queue(cos_queue); CU_ASSERT(recvqueue == queue_cos); + CU_ASSERT(odp_cls_cos_num_queue(cos_queue) == 1); + CU_ASSERT(odp_cls_cos_queues(cos_queue, &queue_out, 1) == 1); + CU_ASSERT(queue_out == queue_cos);
odp_cos_destroy(cos_queue); odp_queue_destroy(queue_cos);
commit cc453ca9fc04f370c3af28d4366c49d5f07bec32 Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Feb 15 14:41:27 2018 +0200
linux-gen: cls: fix single queue bugs
odp_cls_cos_num_queue() and odp_cls_cos_queues() returned 0 for single queue CoS.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index f22dd091..ceef1fc1 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -250,11 +250,12 @@ odp_cos_t odp_cls_cos_create(const char *name, odp_cls_cos_param_t *param) cos->s.linked_cos[j] = NULL; }
+ cos->s.num_queue = param->num_queue; + if (param->num_queue > 1) { odp_queue_param_init(&cos->s.queue_param); cos->s.queue_group = true; cos->s.queue = ODP_QUEUE_INVALID; - cos->s.num_queue = param->num_queue; _odp_cls_update_hash_proto(cos, param->hash_proto); tbl_index = i * CLS_COS_QUEUE_MAX; @@ -358,6 +359,12 @@ int odp_cos_queue_set(odp_cos_t cos_id, odp_queue_t queue_id) ODP_ERR("Invalid odp_cos_t handle"); return -1; } + + if (cos->s.num_queue != 1) { + ODP_ERR("Hashing enabled, cannot set queue"); + return -1; + } + /* Locking is not required as intermittent stale data during CoS modification is acceptable*/ cos->s.queue = queue_id; @@ -402,6 +409,14 @@ uint32_t odp_cls_cos_queues(odp_cos_t cos_id, odp_queue_t queue[], return 0; }
+ if (cos->s.num_queue == 1) { + if (num == 0) + return 1; + + queue[0] = cos->s.queue; + return 1; + } + if (num < cos->s.num_queue) num_queues = num; else
commit 448629199c4b50d5dd22be946b8c0d963479a3f3 Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Feb 15 13:40:46 2018 +0200
validation: sched: add order_unlock_lock test
Added simple ordered lock test, so that new ordered_unlock_lock function is tested at least on single thread.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 2c0d4410..0be6ce3f 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -1336,6 +1336,76 @@ void scheduler_test_pause_resume(void) CU_ASSERT(ret == 0); }
+/* Basic, single threaded ordered lock API testing */ +static void scheduler_test_ordered_lock(void) +{ + odp_queue_t queue; + odp_buffer_t buf; + odp_event_t ev; + odp_queue_t from; + int i; + int ret; + uint32_t lock_count; + + queue = odp_queue_lookup("sched_0_0_o"); + CU_ASSERT_FATAL(queue != ODP_QUEUE_INVALID); + CU_ASSERT_FATAL(odp_queue_type(queue) == ODP_QUEUE_TYPE_SCHED); + CU_ASSERT_FATAL(odp_queue_sched_type(queue) == ODP_SCHED_SYNC_ORDERED); + + lock_count = odp_queue_lock_count(queue); + + if (lock_count == 0) { + printf(" NO ORDERED LOCKS. Ordered locks not tested.\n"); + return; + } + + pool = odp_pool_lookup(MSG_POOL_NAME); + CU_ASSERT_FATAL(pool != ODP_POOL_INVALID); + + for (i = 0; i < BUFS_PER_QUEUE; i++) { + buf = odp_buffer_alloc(pool); + CU_ASSERT_FATAL(buf != ODP_BUFFER_INVALID); + ev = odp_buffer_to_event(buf); + ret = odp_queue_enq(queue, ev); + CU_ASSERT(ret == 0); + + if (ret) + odp_buffer_free(buf); + } + + for (i = 0; i < BUFS_PER_QUEUE / 2; i++) { + from = ODP_QUEUE_INVALID; + ev = odp_schedule(&from, ODP_SCHED_WAIT); + CU_ASSERT_FATAL(ev != ODP_EVENT_INVALID); + CU_ASSERT(from == queue); + buf = odp_buffer_from_event(ev); + odp_schedule_order_lock(0); + odp_schedule_order_unlock(0); + odp_buffer_free(buf); + } + + if (lock_count < 2) { + printf(" ONLY ONE ORDERED LOCK. Unlock_lock not tested.\n"); + return; + } + + for (i = 0; i < BUFS_PER_QUEUE / 2; i++) { + from = ODP_QUEUE_INVALID; + ev = odp_schedule(&from, ODP_SCHED_WAIT); + CU_ASSERT_FATAL(ev != ODP_EVENT_INVALID); + CU_ASSERT(from == queue); + buf = odp_buffer_from_event(ev); + odp_schedule_order_lock(0); + odp_schedule_order_unlock_lock(0, 1); + odp_schedule_order_unlock(1); + odp_buffer_free(buf); + } + + ret = exit_schedule_loop(); + + CU_ASSERT(ret == 0); +} + static int create_queues(void) { int i, j, prios, rc; @@ -1618,6 +1688,7 @@ odp_testinfo_t scheduler_suite[] = { ODP_TEST_INFO(scheduler_test_queue_destroy), ODP_TEST_INFO(scheduler_test_groups), ODP_TEST_INFO(scheduler_test_pause_resume), + ODP_TEST_INFO(scheduler_test_ordered_lock), ODP_TEST_INFO(scheduler_test_parallel), ODP_TEST_INFO(scheduler_test_atomic), ODP_TEST_INFO(scheduler_test_ordered),
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_classification.c | 17 +++++- .../api/classification/odp_classification_basic.c | 4 ++ test/validation/api/scheduler/scheduler.c | 71 ++++++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-)
hooks/post-receive