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 ba9fedae2040d39f71fa8aee6db9512c5cfe21e4 (commit) from ed2364544979bbb83f68bf61ea15e9fb86e2e994 (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 ba9fedae2040d39f71fa8aee6db9512c5cfe21e4 Author: Xuelin Shi forrest.shi@linaro.org Date: Fri Dec 2 16:11:08 2016 +0800
linux-generic: move tm system barrier to tm group
since tm thread is handling tm group, move the thread based barrier to tm group. otherwise, packet cannot get into the second tm system in the same group.
Signed-off-by: Xuelin Shi forrest.shi@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_traffic_mngr_internal.h b/platform/linux-generic/include/odp_traffic_mngr_internal.h index 858183b..9f821fe 100644 --- a/platform/linux-generic/include/odp_traffic_mngr_internal.h +++ b/platform/linux-generic/include/odp_traffic_mngr_internal.h @@ -367,7 +367,6 @@ struct tm_system_s { _odp_tm_group_t odp_tm_group;
odp_ticketlock_t tm_system_lock; - odp_barrier_t tm_system_barrier; odp_barrier_t tm_system_destroy_barrier; odp_atomic_u64_t destroying; _odp_int_name_t name_tbl_id; @@ -416,8 +415,10 @@ struct tm_system_group_s { tm_system_group_t *prev; tm_system_group_t *next;
+ odp_barrier_t tm_group_barrier; tm_system_t *first_tm_system; uint32_t num_tm_systems; + uint32_t first_enq; pthread_t thread; pthread_attr_t attr; }; diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index ffb149b..32702d2 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -1854,6 +1854,7 @@ static int tm_enqueue(tm_system_t *tm_system, tm_queue_obj_t *tm_queue_obj, odp_packet_t pkt) { + tm_system_group_t *tm_group; input_work_item_t work_item; odp_packet_color_t pkt_color; tm_wred_node_t *initial_tm_wred_node; @@ -1868,9 +1869,10 @@ static int tm_enqueue(tm_system_t *tm_system, if (queue_tm_reorder(&tm_queue_obj->tm_qentry, &pkt_hdr->buf_hdr)) return 0;
- if (tm_system->first_enq == 0) { - odp_barrier_wait(&tm_system->tm_system_barrier); - tm_system->first_enq = 1; + tm_group = GET_TM_GROUP(tm_system->odp_tm_group); + if (tm_group->first_enq == 0) { + odp_barrier_wait(&tm_group->tm_group_barrier); + tm_group->first_enq = 1; }
pkt_color = odp_packet_color(pkt); @@ -2327,7 +2329,7 @@ static void *tm_system_thread(void *arg) input_work_queue = tm_system->input_work_queue;
/* Wait here until we have seen the first enqueue operation. */ - odp_barrier_wait(&tm_system->tm_system_barrier); + odp_barrier_wait(&tm_group->tm_group_barrier); main_loop_running = true;
destroying = odp_atomic_load_u64(&tm_system->destroying); @@ -2625,6 +2627,7 @@ static _odp_tm_group_t _odp_tm_group_create(const char *name ODP_UNUSED)
tm_group = malloc(sizeof(tm_system_group_t)); memset(tm_group, 0, sizeof(tm_system_group_t)); + odp_barrier_init(&tm_group->tm_group_barrier, 2);
/* Add this group to the tm_group_list linked list. */ if (tm_group_list == NULL) { @@ -2869,7 +2872,6 @@ odp_tm_t odp_tm_create(const char *name, tm_system->_odp_int_timer_wheel = _ODP_INT_TIMER_WHEEL_INVALID;
odp_ticketlock_init(&tm_system->tm_system_lock); - odp_barrier_init(&tm_system->tm_system_barrier, 2); odp_atomic_init_u64(&tm_system->destroying, 0);
tm_system->_odp_int_sorted_pool = _odp_sorted_pool_create(
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/include/odp_traffic_mngr_internal.h | 3 ++- platform/linux-generic/odp_traffic_mngr.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
hooks/post-receive