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 af88591a590faeadeff8a20d6e996c16fc272171 (commit) via 9ce998af3ae376542a6b52be71d196a50fa032ba (commit) via 695362d8a9aa83eb5cbd7ab1f72d3a3c670fb177 (commit) via 486e4d5231eb84618ccf9ed2bf3ba1e9e2531bba (commit) via 4a9ac7a31a3289222bbba19bc8ecb73561ee9fd7 (commit) via 059af8bd22a1e7d9a9dcc31846b06c55b5759df6 (commit) from 7d91ea174cb2a25fa85e2d39fc8528841c4956fe (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 af88591a590faeadeff8a20d6e996c16fc272171 Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Feb 7 14:04:59 2019 +0200
api: increment version to v1.21.1
Increment minor version number to reflect backward compatible API changes.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/configure.ac b/configure.ac index f6eeeb7e..be5ae787 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_PREREQ([2.5]) ########################################################################## m4_define([odpapi_generation_version], [1]) m4_define([odpapi_major_version], [21]) -m4_define([odpapi_minor_version], [0]) +m4_define([odpapi_minor_version], [1]) m4_define([odpapi_point_version], [0]) m4_define([odpapi_version], [odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version])
commit 9ce998af3ae376542a6b52be71d196a50fa032ba Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Feb 7 12:33:52 2019 +0200
validation: sched: highlight queue vs sched capa
Remove unused queue capa. Rename variables to highlight which capa is used.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 50238ffe..c128580d 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -149,17 +149,17 @@ static void release_context(odp_schedule_sync_t sync)
static void scheduler_test_capa(void) { - odp_schedule_capability_t capa; + odp_schedule_capability_t sched_capa; odp_queue_capability_t queue_capa;
- memset(&capa, 0, sizeof(odp_schedule_capability_t)); - CU_ASSERT_FATAL(odp_schedule_capability(&capa) == 0); + memset(&sched_capa, 0, sizeof(odp_schedule_capability_t)); + CU_ASSERT_FATAL(odp_schedule_capability(&sched_capa) == 0); CU_ASSERT_FATAL(odp_queue_capability(&queue_capa) == 0);
- CU_ASSERT(capa.max_groups != 0); - CU_ASSERT(capa.max_prios != 0); - CU_ASSERT(capa.max_queues != 0); - CU_ASSERT(queue_capa.max_queues >= capa.max_queues); + CU_ASSERT(sched_capa.max_groups != 0); + CU_ASSERT(sched_capa.max_prios != 0); + CU_ASSERT(sched_capa.max_queues != 0); + CU_ASSERT(queue_capa.max_queues >= sched_capa.max_queues); }
static void scheduler_test_wait_time(void) @@ -422,7 +422,6 @@ static void scheduler_test_wait(void)
static void scheduler_test_queue_size(void) { - odp_queue_capability_t queue_capa; odp_schedule_config_t default_config; odp_pool_t pool; odp_pool_param_t pool_param; @@ -436,8 +435,10 @@ static void scheduler_test_queue_size(void) ODP_SCHED_SYNC_ATOMIC, ODP_SCHED_SYNC_ORDERED};
- CU_ASSERT_FATAL(odp_queue_capability(&queue_capa) == 0); queue_size = DEFAULT_NUM_EV; + + /* Scheduler has been already configured. Use default config as max + * queue size. */ odp_schedule_config_init(&default_config); if (default_config.queue_size && queue_size > default_config.queue_size) @@ -1779,7 +1780,7 @@ static void scheduler_test_ordered_lock(void) static int create_queues(test_globals_t *globals) { int i, j, prios, rc; - odp_queue_capability_t capa; + odp_queue_capability_t queue_capa; odp_schedule_capability_t sched_capa; odp_schedule_config_t default_config; odp_pool_t queue_ctx_pool; @@ -1793,7 +1794,7 @@ static int create_queues(test_globals_t *globals) int queues_per_prio; int sched_types;
- if (odp_queue_capability(&capa) < 0) { + if (odp_queue_capability(&queue_capa) < 0) { printf("Queue capability query failed\n"); return -1; } @@ -1826,8 +1827,9 @@ static int create_queues(test_globals_t *globals) num_sched = (prios * queues_per_prio * sched_types) + CHAOS_NUM_QUEUES; num_plain = (prios * queues_per_prio); while ((num_sched > default_config.num_queues || - num_plain > capa.plain.max_num || - num_sched + num_plain > capa.max_queues) && queues_per_prio) { + num_plain > queue_capa.plain.max_num || + num_sched + num_plain > queue_capa.max_queues) && + queues_per_prio) { queues_per_prio--; num_sched = (prios * queues_per_prio * sched_types) + CHAOS_NUM_QUEUES;
commit 695362d8a9aa83eb5cbd7ab1f72d3a3c670fb177 Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Feb 7 10:31:24 2019 +0200
validation: sched: order ignore param test
Added simple, single threaded test to check that events from an ordered queue can be forwarded to a plain queue which ignores ordering (created with ODP_QUEUE_ORDER_IGNORE).
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index bdcd7b2d..50238ffe 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -23,7 +23,7 @@ #define NUM_GROUPS 2 #define MAX_QUEUES (64 * 1024)
-#define TEST_QUEUE_SIZE_NUM_EV 50 +#define DEFAULT_NUM_EV 50
#define MAX_FLOWS 16 #define FLOW_TEST_NUM_EV (10 * MAX_FLOWS) @@ -437,7 +437,7 @@ static void scheduler_test_queue_size(void) ODP_SCHED_SYNC_ORDERED};
CU_ASSERT_FATAL(odp_queue_capability(&queue_capa) == 0); - queue_size = TEST_QUEUE_SIZE_NUM_EV; + queue_size = DEFAULT_NUM_EV; odp_schedule_config_init(&default_config); if (default_config.queue_size && queue_size > default_config.queue_size) @@ -446,7 +446,7 @@ static void scheduler_test_queue_size(void) odp_pool_param_init(&pool_param); pool_param.buf.size = 100; pool_param.buf.align = 0; - pool_param.buf.num = TEST_QUEUE_SIZE_NUM_EV; + pool_param.buf.num = DEFAULT_NUM_EV; pool_param.type = ODP_POOL_BUFFER;
pool = odp_pool_create("test_queue_size", &pool_param); @@ -489,7 +489,7 @@ static void scheduler_test_queue_size(void) }
num = 0; - for (j = 0; j < 100 * TEST_QUEUE_SIZE_NUM_EV; j++) { + for (j = 0; j < 100 * DEFAULT_NUM_EV; j++) { ev = odp_schedule(&from, ODP_SCHED_NO_WAIT);
if (ev == ODP_EVENT_INVALID) @@ -507,6 +507,120 @@ static void scheduler_test_queue_size(void) CU_ASSERT_FATAL(odp_pool_destroy(pool) == 0); }
+static void scheduler_test_order_ignore(void) +{ + odp_queue_capability_t queue_capa; + odp_schedule_config_t default_config; + odp_pool_t pool; + odp_pool_param_t pool_param; + odp_queue_param_t queue_param; + odp_queue_t ordered, plain, from; + odp_event_t ev; + odp_buffer_t buf; + uint32_t j, queue_size, num; + int ret; + + odp_schedule_config_init(&default_config); + CU_ASSERT_FATAL(odp_queue_capability(&queue_capa) == 0); + + queue_size = DEFAULT_NUM_EV; + if (default_config.queue_size && + queue_size > default_config.queue_size) + queue_size = default_config.queue_size; + + if (queue_capa.plain.max_size && + queue_size > queue_capa.plain.max_size) + queue_size = queue_capa.plain.max_size; + + odp_pool_param_init(&pool_param); + pool_param.buf.size = 100; + pool_param.buf.align = 0; + pool_param.buf.num = DEFAULT_NUM_EV; + pool_param.type = ODP_POOL_BUFFER; + + pool = odp_pool_create("test_order_ignore", &pool_param); + + CU_ASSERT_FATAL(pool != ODP_POOL_INVALID); + + /* Ensure that scheduler is empty */ + for (j = 0; j < 10;) { + ev = odp_schedule(NULL, ODP_SCHED_NO_WAIT); + CU_ASSERT(ev == ODP_EVENT_INVALID); + + if (ev != ODP_EVENT_INVALID) + odp_event_free(ev); + else + j++; + } + + odp_queue_param_init(&queue_param); + queue_param.type = ODP_QUEUE_TYPE_SCHED; + queue_param.sched.prio = odp_schedule_default_prio(); + queue_param.sched.sync = ODP_SCHED_SYNC_ORDERED; + queue_param.sched.group = ODP_SCHED_GROUP_ALL; + + ordered = odp_queue_create("ordered", &queue_param); + CU_ASSERT_FATAL(ordered != ODP_QUEUE_INVALID); + + odp_queue_param_init(&queue_param); + queue_param.type = ODP_QUEUE_TYPE_PLAIN; + queue_param.order = ODP_QUEUE_ORDER_IGNORE; + + plain = odp_queue_create("plain", &queue_param); + CU_ASSERT_FATAL(plain != ODP_QUEUE_INVALID); + + num = 0; + for (j = 0; j < queue_size; j++) { + buf = odp_buffer_alloc(pool); + CU_ASSERT_FATAL(buf != ODP_BUFFER_INVALID); + + ev = odp_buffer_to_event(buf); + ret = odp_queue_enq(ordered, ev); + + if (ret) + odp_event_free(ev); + else + num++; + } + + CU_ASSERT(num == queue_size); + + num = 0; + for (j = 0; j < 100 * DEFAULT_NUM_EV; j++) { + ev = odp_schedule(&from, ODP_SCHED_NO_WAIT); + + if (ev == ODP_EVENT_INVALID) + continue; + + CU_ASSERT(from == ordered); + ret = odp_queue_enq(plain, ev); + + if (ret) + odp_event_free(ev); + else + num++; + } + + CU_ASSERT(num == queue_size); + + num = 0; + for (j = 0; j < 100 * DEFAULT_NUM_EV; j++) { + ev = odp_queue_deq(plain); + + if (ev == ODP_EVENT_INVALID) + continue; + + odp_event_free(ev); + num++; + } + + CU_ASSERT(num == queue_size); + + CU_ASSERT_FATAL(odp_queue_destroy(ordered) == 0); + CU_ASSERT_FATAL(odp_queue_destroy(plain) == 0); + CU_ASSERT_FATAL(odp_pool_destroy(pool) == 0); +} + static void scheduler_test_groups(void) { odp_pool_t p; @@ -2136,6 +2250,7 @@ odp_testinfo_t scheduler_suite[] = { ODP_TEST_INFO(scheduler_test_queue_destroy), ODP_TEST_INFO(scheduler_test_wait), ODP_TEST_INFO(scheduler_test_queue_size), + ODP_TEST_INFO(scheduler_test_order_ignore), ODP_TEST_INFO(scheduler_test_groups), ODP_TEST_INFO(scheduler_test_pause_resume), ODP_TEST_INFO(scheduler_test_ordered_lock),
commit 486e4d5231eb84618ccf9ed2bf3ba1e9e2531bba Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Feb 7 12:18:59 2019 +0200
linux-gen: sched: implement QUEUE_ORDER_IGNORE option in scalable
Scalable scheduler implementation of QUEUE_ORDER_IGNORE option.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index 88abe8c7..b4e62b08 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -632,7 +632,8 @@ static int _queue_enq_multi(odp_queue_t handle, odp_buffer_hdr_t *buf_hdr[],
queue = qentry_from_int(handle); ts = sched_ts; - if (ts && odp_unlikely(ts->out_of_order)) { + if (ts && odp_unlikely(ts->out_of_order) && + (queue->s.param.order == ODP_QUEUE_ORDER_KEEP)) { actual = rctx_save(queue, buf_hdr, num); return actual; } @@ -888,6 +889,7 @@ static void queue_param_init(odp_queue_param_t *params) params->sched.prio = odp_schedule_default_prio(); params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL; + params->order = ODP_QUEUE_ORDER_KEEP; }
static int queue_info(odp_queue_t handle, odp_queue_info_t *info) diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 4e9dd771..326c49e3 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -2064,8 +2064,9 @@ static int ord_enq_multi(odp_queue_t handle, void *buf_hdr[], int num, int actual;
ts = sched_ts; - if (ts && odp_unlikely(ts->out_of_order)) { - queue = qentry_from_int(handle); + queue = qentry_from_int(handle); + if (ts && odp_unlikely(ts->out_of_order) && + (queue->s.param.order == ODP_QUEUE_ORDER_KEEP)) { actual = rctx_save(queue, (odp_buffer_hdr_t **)buf_hdr, num); *ret = actual; return 1;
commit 4a9ac7a31a3289222bbba19bc8ecb73561ee9fd7 Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Feb 7 09:31:50 2019 +0200
linux-gen: sched: implement QUEUE_ORDER_IGNORE option
If destination queue does not require order maintenance, fall back from ordered enqueue to normal enqueue operation.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c index 37a2fad1..74ed1faa 100644 --- a/platform/linux-generic/odp_queue_basic.c +++ b/platform/linux-generic/odp_queue_basic.c @@ -615,6 +615,7 @@ static void queue_param_init(odp_queue_param_t *params) params->enq_mode = ODP_QUEUE_OP_MT; params->deq_mode = ODP_QUEUE_OP_MT; params->nonblocking = ODP_BLOCKING; + params->order = ODP_QUEUE_ORDER_KEEP; params->sched.prio = odp_schedule_default_prio(); params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL; diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c index 6176c951..d20fd735 100644 --- a/platform/linux-generic/odp_schedule_basic.c +++ b/platform/linux-generic/odp_schedule_basic.c @@ -846,9 +846,13 @@ static int schedule_ord_enq_multi(odp_queue_t dst_queue, void *buf_hdr[], if (sched_local.ordered.in_order) return 0;
+ dst_qentry = qentry_from_handle(dst_queue); + + if (dst_qentry->s.param.order == ODP_QUEUE_ORDER_IGNORE) + return 0; + src_queue = sched_local.ordered.src_queue; stash_num = sched_local.ordered.stash_num; - dst_qentry = qentry_from_handle(dst_queue);
if (ordered_own_turn(src_queue)) { /* Own turn, so can do enqueue directly. */
commit 059af8bd22a1e7d9a9dcc31846b06c55b5759df6 Author: Petri Savolainen petri.savolainen@nokia.com Date: Wed Feb 6 16:40:00 2019 +0200
api: queue: add order maintenance parameter
Added a parameter to control if a destination queue does not require event re-ordering. By default, event order is maintained for all destination queues as before. Application may use ODP_QUEUE_ORDER_IGNORE for those queues that are used under ordered queue context, but do not require re-ordering and/or do need to avoid extra re-ordering delays.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/include/odp/api/spec/queue_types.h b/include/odp/api/spec/queue_types.h index c8f31046..3ed9246d 100644 --- a/include/odp/api/spec/queue_types.h +++ b/include/odp/api/spec/queue_types.h @@ -122,6 +122,37 @@ typedef enum odp_nonblocking_t {
} odp_nonblocking_t;
+/** + * Original event order maintenance options + * + * Options to keep or ignore the original event order of a source queue. This + * option is relevant for (plain or parallel scheduled) queues that are + * destinations for events enqueued while holding an ordered queue + * synchronization context. By default, an ordered context maintains original + * event order regardless of the destination queue type. Event re-ordering may + * cause extra synchronization effort for implementation and a long delay before + * application can receive a re-ordered event from the destination queue. This + * is wasteful and in some cases the extra delay is not acceptable for those + * destination queues that do not need to maintain the original event order. + * Application can use ODP_QUEUE_ORDER_IGNORE option to prevent implementation + * from performing unnecessary event re-ordering and negative side-effects of + * that. + */ +typedef enum odp_queue_order_t { + /** Keep original event order. Events enqueued into this queue while + * holding an ordered queue synchronization context maintain the + * original event order of the source queue. + */ + ODP_QUEUE_ORDER_KEEP = 0, + + /** Ignore original event order. Events enqueued into this queue do not + * need to maintain the original event order of the source queue. + * Implementation must avoid significant event re-ordering delays. + */ + ODP_QUEUE_ORDER_IGNORE + +} odp_queue_order_t; + /** * Queue capabilities */ @@ -262,6 +293,12 @@ typedef struct odp_queue_param_t { * ODP_QUEUE_TYPE_SCHED. */ odp_schedule_param_t sched;
+ /** Original event order maintenance + * + * Keep or ignore the original event order of a source queue. + * The default value is ODP_QUEUE_ORDER_KEEP. */ + odp_queue_order_t order; + /** Non-blocking level * * Queue implementation must guarantee at least this level of block diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h index 2acec0db..c5325901 100644 --- a/include/odp/api/spec/schedule_types.h +++ b/include/odp/api/spec/schedule_types.h @@ -77,7 +77,10 @@ extern "C" { * The atomic queue synchronization context is dedicated to the thread until it * requests another event from the scheduler, which implicitly releases the * context. User may allow the scheduler to release the context earlier than - * that by calling odp_schedule_release_atomic(). + * that by calling odp_schedule_release_atomic(). However, this call is just + * a hint to the implementation and the context may be held until the next + * schedule call. + * * When scheduler is enabled as flow-aware, the event flow id value affects * scheduling of the event and synchronization is maintained per flow within * each queue. @@ -97,7 +100,9 @@ extern "C" { * queue synchronization context. A thread holds the context until it * requests another event from the scheduler, which implicitly releases the * context. User may allow the scheduler to release the context earlier than - * that by calling odp_schedule_release_ordered(). + * that by calling odp_schedule_release_ordered(). However, this call is just + * a hint to the implementation and the context may be held until the next + * schedule call. * * Events from the same (source) queue appear in their original order * when dequeued from a destination queue. The destination queue can have any @@ -107,6 +112,11 @@ extern "C" { * (e.g. freed or stored) within the context are considered missing from * reordering and are skipped at this time (but can be ordered again within * another context). + * + * Unnecessary event re-ordering may be avoided for those destination queues + * that do not need to maintain the original event order by setting 'order' + * queue parameter to ODP_QUEUE_ORDER_IGNORE. + * * When scheduler is enabled as flow-aware, the event flow id value affects * scheduling of the event and synchronization is maintained per flow within * each queue.
-----------------------------------------------------------------------
Summary of changes: configure.ac | 2 +- include/odp/api/spec/queue_types.h | 37 ++++++ include/odp/api/spec/schedule_types.h | 14 ++- platform/linux-generic/odp_queue_basic.c | 1 + platform/linux-generic/odp_queue_scalable.c | 4 +- platform/linux-generic/odp_schedule_basic.c | 6 +- platform/linux-generic/odp_schedule_scalable.c | 5 +- test/validation/api/scheduler/scheduler.c | 151 ++++++++++++++++++++++--- 8 files changed, 196 insertions(+), 24 deletions(-)
hooks/post-receive