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, api-next has been updated via e344e4364f771f32b86d822d0c447770588fe65d (commit) via f3fa10fa00f5040f5ce2bfd18894227a7ef76c02 (commit) via 4e6dbf3c8151335c2a5361da3f228666c688d8fa (commit) via f172905f96be14da4760653cba92cd1f9c820374 (commit) via 7018fa1c5e446ca8f60490c848a95b27e942783b (commit) via f66f92352bb5d1ed3a19fe5b5b8ca0419e525274 (commit) via e35949df96b46d2e23ca83029f468415efcbf18a (commit) via d248692dfe6ace13138e48eb1c23c1f5e942269c (commit) via 88efcd91e325438d7e2b7c410213ca95a9acefe5 (commit) from f91cde2bb770eefcfe791ce49c67ce3b1f5bf6d2 (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 e344e4364f771f32b86d822d0c447770588fe65d Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Sep 12 10:59:50 2017 +0300
api: ipsec: rename odp_ipsec_mtu_update to follow odp_ipsec_sa_* pattern
All SA-related functions use odp_ipsec_sa_ prefix, except odp_ipsec_mtu_update(). Rename this function to follow this pattern.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 0b36b864..5631989f 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -714,7 +714,7 @@ typedef struct odp_ipsec_sa_param_t { * * This is the maximum length of IP packets that * outbound IPSEC operations may produce. The value may - * be updated later with odp_ipsec_mtu_update(). + * be updated later with odp_ipsec_sa_mtu_update(). */ uint32_t mtu;
@@ -1481,7 +1481,7 @@ int odp_ipsec_status(odp_ipsec_status_t *status, odp_event_t event); * @retval 0 On success * @retval <0 On failure */ -int odp_ipsec_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu); +int odp_ipsec_sa_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu);
/** * Get user defined SA context pointer diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index c7eeb4ec..04757e78 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -147,7 +147,7 @@ int odp_ipsec_status(odp_ipsec_status_t *status, odp_event_t event) return -1; }
-int odp_ipsec_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu) +int odp_ipsec_sa_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu) { (void)sa; (void)mtu;
commit f3fa10fa00f5040f5ce2bfd18894227a7ef76c02 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Thu Sep 14 03:45:26 2017 -0700
test: validation: schduler: change order lock function signature
change order lock function param signature from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/common_plat/validation/api/scheduler/scheduler.c b/test/common_plat/validation/api/scheduler/scheduler.c index 963275be..2c0d4410 100644 --- a/test/common_plat/validation/api/scheduler/scheduler.c +++ b/test/common_plat/validation/api/scheduler/scheduler.c @@ -730,12 +730,12 @@ static int schedule_common_(void *arg) continue;
if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc;
ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0);
qctx = odp_queue_context(from);
@@ -781,12 +781,12 @@ static int schedule_common_(void *arg) buf = odp_buffer_from_event(ev); num = 1; if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc;
ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0);
qctx = odp_queue_context(from); bctx = odp_buffer_addr(buf); @@ -996,11 +996,11 @@ static void reset_queues(thread_args_t *args) for (k = 0; k < args->num_bufs; k++) { queue_context *qctx = odp_queue_context(queue); - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max;
ndx_max = odp_queue_lock_count(queue); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx->sequence = 0; for (ndx = 0; ndx < ndx_max; ndx++) qctx->lock_sequence[ndx] = 0; @@ -1436,7 +1436,7 @@ static int create_queues(void) return -1; } if (odp_queue_lock_count(q) != - (int)capa.max_ordered_locks) { + capa.max_ordered_locks) { printf("Queue %" PRIu64 " created with " "%d locks instead of expected %d\n", odp_queue_to_u64(q),
commit 4e6dbf3c8151335c2a5361da3f228666c688d8fa Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Thu Sep 14 03:44:49 2017 -0700
test: validation: queue: change order lock data type
change oder lock count data type from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c index 94d0a2fd..1ec05b1f 100644 --- a/test/common_plat/validation/api/queue/queue.c +++ b/test/common_plat/validation/api/queue/queue.c @@ -267,9 +267,9 @@ void queue_test_info(void) odp_queue_capability_t capability; char q_plain_ctx[] = "test_q_plain context data"; char q_order_ctx[] = "test_q_order context data"; - unsigned lock_count; + uint32_t lock_count; char *ctx; - int ret; + uint32_t ret;
/* Create a plain queue and set context */ q_plain = odp_queue_create(nq_plain, NULL); @@ -314,8 +314,8 @@ void queue_test_info(void) CU_ASSERT(info.param.sched.sync == odp_queue_sched_type(q_order)); CU_ASSERT(info.param.sched.group == odp_queue_sched_group(q_order)); ret = odp_queue_lock_count(q_order); - CU_ASSERT(ret >= 0); - lock_count = (unsigned)ret; + CU_ASSERT(ret > 0); + lock_count = ret; CU_ASSERT(info.param.sched.lock_count == lock_count);
CU_ASSERT(odp_queue_destroy(q_plain) == 0);
commit f172905f96be14da4760653cba92cd1f9c820374 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Fri Sep 15 14:28:38 2017 +0530
linux-generic: schedule: implement schedule order unlock lock api
Implements odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW.
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 272c6af6..06a70bdd 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -40,6 +40,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); +typedef void (*schedule_order_unlock_lock_fn_t)(void); typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
@@ -59,6 +60,7 @@ typedef struct schedule_fn_t { schedule_term_local_fn_t term_local; schedule_order_lock_fn_t order_lock; schedule_order_unlock_fn_t order_unlock; + schedule_order_unlock_lock_fn_t order_unlock_lock; schedule_max_ordered_locks_fn_t max_ordered_locks;
/* Called only when status_sync is set */ @@ -102,6 +104,7 @@ typedef struct { odp_schedule_group_info_t *); void (*schedule_order_lock)(uint32_t); void (*schedule_order_unlock)(uint32_t); + void (*schedule_order_unlock_lock)(uint32_t, uint32_t);
} schedule_api_t;
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index b23cbec9..59d924a5 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -1144,6 +1144,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1); }
+static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_pause(void) { sched_local.pause = 1; @@ -1429,5 +1436,6 @@ const schedule_api_t schedule_default_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index ff664420..08ca813a 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -129,3 +129,8 @@ void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } + +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index) +{ + sched_api->schedule_order_unlock_lock(unlock_index, lock_index); +} diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index 59126a83..1ad918a4 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1299,6 +1299,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); }
+static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; @@ -1371,7 +1378,8 @@ const schedule_api_t schedule_iquery_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock };
static void thread_set_interest(sched_thread_local_t *thread, diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 6f769ca5..642e7ee7 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -1179,6 +1179,13 @@ static void schedule_order_unlock(uint32_t lock_index) rctx->olock_flags |= 1U << lock_index; }
+static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_release_atomic(void) { sched_scalable_thread_state_t *ts; @@ -2088,4 +2095,5 @@ const schedule_api_t schedule_scalable_api = { .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock, }; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 0dd2404a..7f0404b1 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -822,6 +822,13 @@ static void schedule_order_unlock(uint32_t lock_index) (void)lock_index; }
+static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + (void)unlock_index; + (void)lock_index; +} + static void order_lock(void) { } @@ -871,5 +878,6 @@ const schedule_api_t schedule_sp_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock };
commit 7018fa1c5e446ca8f60490c848a95b27e942783b Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Fri Sep 15 14:27:51 2017 +0530
linux-generic: schedule: change order lock function signature
change function param signature from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 71538e62..272c6af6 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -40,7 +40,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); -typedef unsigned (*schedule_max_ordered_locks_fn_t)(void); +typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
typedef struct schedule_fn_t { @@ -100,8 +100,8 @@ typedef struct { int (*schedule_group_thrmask)(odp_schedule_group_t, odp_thrmask_t *); int (*schedule_group_info)(odp_schedule_group_t, odp_schedule_group_info_t *); - void (*schedule_order_lock)(unsigned); - void (*schedule_order_unlock)(unsigned); + void (*schedule_order_lock)(uint32_t); + void (*schedule_order_unlock)(uint32_t);
} schedule_api_t;
diff --git a/platform/linux-generic/include/odp_schedule_scalable_ordered.h b/platform/linux-generic/include/odp_schedule_scalable_ordered.h index ca49bbf4..c493dead 100644 --- a/platform/linux-generic/include/odp_schedule_scalable_ordered.h +++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h @@ -79,7 +79,7 @@ typedef struct reorder_window { uint32_t tail; uint32_t turn; uint32_t olock[CONFIG_QUEUE_MAX_ORD_LOCKS]; - uint16_t lock_count; + uint32_t lock_count; /* Reorder contexts in this window */ reorder_context_t *ring[RWIN_SIZE]; } reorder_window_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 8c444f4d..b23cbec9 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -250,7 +250,7 @@ typedef struct { int prio; int queue_per_prio; int sync; - unsigned order_lock_count; + uint32_t order_lock_count; } queue[ODP_CONFIG_QUEUES];
struct { @@ -465,7 +465,7 @@ static inline int grp_update_tbl(void) return num; }
-static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } @@ -699,7 +699,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i;
qi = sched_local.ordered.src_queue;
@@ -1100,7 +1100,7 @@ static void order_unlock(void) { }
-static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1127,7 +1127,7 @@ static void schedule_order_lock(unsigned lock_index) } }
-static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index e56e3722..ff664420 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -120,12 +120,12 @@ int odp_schedule_group_info(odp_schedule_group_t group, return sched_api->schedule_group_info(group, info); }
-void odp_schedule_order_lock(unsigned lock_index) +void odp_schedule_order_lock(uint32_t lock_index) { return sched_api->schedule_order_lock(lock_index); }
-void odp_schedule_order_unlock(unsigned lock_index) +void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index afe8ee1a..59126a83 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1153,7 +1153,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i;
qi = thread_local.ordered.src_queue;
@@ -1255,7 +1255,7 @@ static void order_unlock(void) { }
-static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1282,7 +1282,7 @@ static void schedule_order_lock(unsigned lock_index) } }
-static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1299,7 +1299,7 @@ static void schedule_order_unlock(unsigned lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); }
-static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 676b3419..6f769ca5 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -1141,7 +1141,7 @@ restart_same:
/******************************************************************************/
-static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { struct reorder_context *rctx = sched_ts->rctx;
@@ -1161,7 +1161,7 @@ static void schedule_order_lock(unsigned lock_index) } }
-static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { struct reorder_context *rctx;
@@ -2046,7 +2046,7 @@ static void order_unlock(void) { }
-static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable_ordered.c b/platform/linux-generic/odp_schedule_scalable_ordered.c index 7261b446..9bc12f2a 100644 --- a/platform/linux-generic/odp_schedule_scalable_ordered.c +++ b/platform/linux-generic/odp_schedule_scalable_ordered.c @@ -246,7 +246,7 @@ static inline void olock_unlock(const reorder_context_t *rctx, static void olock_release(const reorder_context_t *rctx) { reorder_window_t *rwin; - int i; + uint32_t i;
rwin = rctx->rwin;
diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 47e6ddd3..0dd2404a 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -243,7 +243,7 @@ static int term_local(void) return 0; }
-static unsigned max_ordered_locks(void) +static uint32_t max_ordered_locks(void) { return NUM_ORDERED_LOCKS; } @@ -812,12 +812,12 @@ static int schedule_group_info(odp_schedule_group_t group, return 0; }
-static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { (void)lock_index; }
-static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { (void)lock_index; }
commit f66f92352bb5d1ed3a19fe5b5b8ca0419e525274 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Thu Sep 14 02:11:24 2017 -0700
linux-generic: queue: change order lock count data type
change order lock count data type from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_queue_if.h b/platform/linux-generic/include/odp_queue_if.h index 410c6b79..ed8d6ca9 100644 --- a/platform/linux-generic/include/odp_queue_if.h +++ b/platform/linux-generic/include/odp_queue_if.h @@ -38,7 +38,7 @@ typedef struct { odp_schedule_sync_t (*queue_sched_type)(odp_queue_t queue); odp_schedule_prio_t (*queue_sched_prio)(odp_queue_t queue); odp_schedule_group_t (*queue_sched_group)(odp_queue_t queue); - int (*queue_lock_count)(odp_queue_t queue); + uint32_t (*queue_lock_count)(odp_queue_t queue); uint64_t (*queue_to_u64)(odp_queue_t hdl); void (*queue_param_init)(odp_queue_param_t *param); int (*queue_info)(odp_queue_t queue, odp_queue_info_t *info); diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index d941accc..3f355e69 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -175,12 +175,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return handle_to_qentry(handle)->s.param.sched.group; }
-static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = handle_to_qentry(handle);
return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + queue->s.param.sched.lock_count : 0; }
static odp_queue_t queue_create(const char *name, diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-generic/odp_queue_if.c index 44fda0d6..969b0d3c 100644 --- a/platform/linux-generic/odp_queue_if.c +++ b/platform/linux-generic/odp_queue_if.c @@ -92,7 +92,7 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue) return queue_api->queue_sched_group(queue); }
-int odp_queue_lock_count(odp_queue_t queue) +uint32_t odp_queue_lock_count(odp_queue_t queue) { return queue_api->queue_lock_count(queue); } diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index cef3236d..07201ce7 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -341,12 +341,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return qentry_from_int(queue_from_ext(handle))->s.param.sched.group; }
-static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = qentry_from_int(queue_from_ext(handle));
return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + queue->s.param.sched.lock_count : 0; }
static odp_queue_t queue_create(const char *name,
commit e35949df96b46d2e23ca83029f468415efcbf18a Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Thu Sep 14 03:27:11 2017 -0700
api: schedule: add schedule order unlock lock api
Adds odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index e2abf990..fe2300db 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,27 @@ void odp_schedule_order_lock(uint32_t lock_index); void odp_schedule_order_unlock(uint32_t lock_index);
/** + * Release existing ordered context lock and acquire a new lock + * + * This call is valid only when holding an ordered synchronization context. + * Release a previously locked ordered context lock and acquire a new ordered + * context lock. The operation is equivalent to application calling first + * odp_schedule_order_unlock(unlock_index) and then + * odp_schedule_order_lock(lock_index). The same constraints apply with this + * call as with those two. + * + * @param unlock_index Index of the acquired ordered lock in the current + * context to be released. + * @param lock_index Index of the ordered lock in the current context to be + * acquired. Must be in the range + * 0...odp_queue_lock_count() - 1. + * + * @see odp_schedule_order_lock(), odp_schedule_order_unlock() + * + */ +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); + +/** * @} */
commit d248692dfe6ace13138e48eb1c23c1f5e942269c Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Sep 11 06:16:42 2017 -0700
api: schedule: remove support for nested ordered lock
removes support for nested ordered lock use-case changes function param signature from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index 8244746d..e2abf990 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -347,12 +347,15 @@ int odp_schedule_group_info(odp_schedule_group_t group, * be protected by its own ordered lock. This promotes maximum parallelism by * allowing order to maintained on a more granular basis. If an ordered lock * is used multiple times in the same ordered context results are undefined. + * Only one ordered lock can be active in an ordered context at any given time. + * Results are undefined when multiple ordered locks are acquired in nested + * fashion within the same ordered context. * * @param lock_index Index of the ordered lock in the current context to be * acquired. Must be in the range 0..odp_queue_lock_count() * - 1 */ -void odp_schedule_order_lock(unsigned lock_index); +void odp_schedule_order_lock(uint32_t lock_index);
/** * Release ordered context lock @@ -365,7 +368,7 @@ void odp_schedule_order_lock(unsigned lock_index); * hold this lock. Must be in the range * 0..odp_queue_lock_count() - 1 */ -void odp_schedule_order_unlock(unsigned lock_index); +void odp_schedule_order_unlock(uint32_t lock_index);
/** * @} diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h index 8a4e42c6..397f98fc 100644 --- a/include/odp/api/spec/schedule_types.h +++ b/include/odp/api/spec/schedule_types.h @@ -146,7 +146,7 @@ typedef struct odp_schedule_param_t { /** Ordered lock count for this queue * * Default value is 0. */ - unsigned lock_count; + uint32_t lock_count; } odp_schedule_param_t;
/**
commit 88efcd91e325438d7e2b7c410213ca95a9acefe5 Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Thu Sep 14 02:09:39 2017 -0700
api: queue: change order lock count data type
change order lock count data type from unsigned to uint32_t
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 9dd0a561..73598be0 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -106,7 +106,7 @@ typedef struct odp_queue_capability_t { uint32_t max_queues;
/** Maximum number of ordered locks per queue */ - unsigned max_ordered_locks; + uint32_t max_ordered_locks;
/** Maximum number of scheduling groups */ unsigned max_sched_groups; @@ -393,10 +393,11 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue); * * @param queue Queue handle * - * @return Number of ordered locks associated with this ordered queue - * @retval <0 Specified queue is not ordered + * @return Number of ordered locks associated with this ordered queue + * @retval 0 Specified queue is not ordered or no ordered lock associated + * with the ordered queue. */ -int odp_queue_lock_count(odp_queue_t queue); +uint32_t odp_queue_lock_count(odp_queue_t queue);
/** * Get printable value for an odp_queue_t
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/ipsec.h | 4 ++-- include/odp/api/spec/queue.h | 9 +++---- include/odp/api/spec/schedule.h | 28 ++++++++++++++++++++-- include/odp/api/spec/schedule_types.h | 2 +- platform/linux-generic/include/odp_queue_if.h | 2 +- platform/linux-generic/include/odp_schedule_if.h | 9 ++++--- .../include/odp_schedule_scalable_ordered.h | 2 +- platform/linux-generic/odp_ipsec.c | 2 +- platform/linux-generic/odp_queue.c | 4 ++-- platform/linux-generic/odp_queue_if.c | 2 +- platform/linux-generic/odp_queue_scalable.c | 4 ++-- platform/linux-generic/odp_schedule.c | 20 +++++++++++----- platform/linux-generic/odp_schedule_if.c | 9 +++++-- platform/linux-generic/odp_schedule_iquery.c | 18 ++++++++++---- platform/linux-generic/odp_schedule_scalable.c | 14 ++++++++--- .../linux-generic/odp_schedule_scalable_ordered.c | 2 +- platform/linux-generic/odp_schedule_sp.c | 16 +++++++++---- test/common_plat/validation/api/queue/queue.c | 8 +++---- .../validation/api/scheduler/scheduler.c | 20 ++++++++-------- 19 files changed, 120 insertions(+), 55 deletions(-)
hooks/post-receive