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 ae4f1d82ed704992c1d8284c23795b9e076b33b9 (commit) via d2b3aa9a7ffc3028eedc7dbeb6257d7efd91bc05 (commit) via 66305f01a57741dc5eca061364e65a5f4da8584f (commit) from 1b259a7a4e573080f4debc542cab7a0b996f4c88 (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 ae4f1d82ed704992c1d8284c23795b9e076b33b9 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Oct 12 18:58:37 2017 +0300
example: traffic_mgmt: add to make check
add traffic_mgmt example to make check https://bugs.linaro.org/show_bug.cgi?id=3024
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
diff --git a/example/traffic_mgmt/Makefile.am b/example/traffic_mgmt/Makefile.am index c8ff7975..145065bb 100644 --- a/example/traffic_mgmt/Makefile.am +++ b/example/traffic_mgmt/Makefile.am @@ -6,4 +6,8 @@ odp_traffic_mgmt_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
noinst_HEADERS = $(top_srcdir)/example/example_debug.h
+if test_example +TESTS = odp_traffic_mgmt +endif + dist_odp_traffic_mgmt_SOURCES = odp_traffic_mgmt.c
commit d2b3aa9a7ffc3028eedc7dbeb6257d7efd91bc05 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Oct 12 18:54:59 2017 +0300
example: traffic_mgmt add clean termination path
example aborted on exit due to missing termination path (exit terminated fd_server which signaled app on the exit from main.) https://bugs.linaro.org/show_bug.cgi?id=3024
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
diff --git a/example/traffic_mgmt/odp_traffic_mgmt.c b/example/traffic_mgmt/odp_traffic_mgmt.c index c83b6152..1f1102dd 100644 --- a/example/traffic_mgmt/odp_traffic_mgmt.c +++ b/example/traffic_mgmt/odp_traffic_mgmt.c @@ -766,12 +766,13 @@ int main(int argc, char *argv[]) rc = odp_init_global(&instance, &ODP_INIT_PARAMS, NULL); if (rc != 0) { printf("Error: odp_init_global() failed, rc = %d\n", rc); - abort(); + return -1; } + rc = odp_init_local(instance, ODP_THREAD_CONTROL); if (rc != 0) { printf("Error: odp_init_local() failed, rc = %d\n", rc); - abort(); + return -1; }
if (process_cmd_line_options(argc, argv) < 0) @@ -793,5 +794,30 @@ int main(int argc, char *argv[]) pkts_into_tm, pkts_from_tm);
odp_tm_stats_print(odp_tm_test); + + rc = odp_pool_destroy(odp_pool); + if (rc != 0) { + printf("Error: odp_pool_destroy() failed, rc = %d\n", rc); + return -1; + } + + rc = odp_tm_destroy(odp_tm_test); + if (rc != 0) { + printf("Error: odp_tm_destroy() failed, rc = %d\n", rc); + return -1; + } + + rc = odp_term_local(); + if (rc != 0) { + printf("Error: odp_term_local() failed, rc = %d\n", rc); + return -1; + } + + /* Trying to keep this example as simple as possible we avoid + * clean termination of TM queues. This will error on global + * termination code + */ + (void)odp_term_global(instance); + return 0; }
commit 66305f01a57741dc5eca061364e65a5f4da8584f Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Oct 12 18:26:26 2017 +0300
linux-gen: odp_tm_stats_print should not depend on debug
odp_tm_stats_print() is odp api call it should not depend on compilation debug options. Which is very confusing people to not see any valid output. https://bugs.linaro.org/show_bug.cgi?id=3024
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
diff --git a/platform/linux-generic/odp_pkt_queue.c b/platform/linux-generic/odp_pkt_queue.c index 613e39dd..4f6a1eb6 100644 --- a/platform/linux-generic/odp_pkt_queue.c +++ b/platform/linux-generic/odp_pkt_queue.c @@ -392,17 +392,17 @@ void _odp_pkt_queue_stats_print(_odp_int_queue_pool_t queue_pool) queue_pool_t *pool;
pool = (queue_pool_t *)(uintptr_t)queue_pool; - ODP_DBG("pkt_queue_stats - queue_pool=0x%" PRIX64 "\n", queue_pool); - ODP_DBG(" max_queue_num=%u max_queued_pkts=%u next_queue_num=%u\n", - pool->max_queue_num, pool->max_queued_pkts, - pool->next_queue_num); - ODP_DBG(" total pkt appends=%" PRIu64 " total pkt removes=%" PRIu64 - " bad removes=%" PRIu64 "\n", - pool->total_pkt_appends, pool->total_pkt_removes, - pool->total_bad_removes); - ODP_DBG(" free_list size=%u min size=%u peak size=%u\n", - pool->free_list_size, pool->min_free_list_size, - pool->peak_free_list_size); + ODP_PRINT("pkt_queue_stats - queue_pool=0x%" PRIX64 "\n", queue_pool); + ODP_PRINT(" max_queue_num=%u max_queued_pkts=%u next_queue_num=%u\n", + pool->max_queue_num, pool->max_queued_pkts, + pool->next_queue_num); + ODP_PRINT(" total pkt appends=%" PRIu64 " total pkt removes=%" PRIu64 + " bad removes=%" PRIu64 "\n", + pool->total_pkt_appends, pool->total_pkt_removes, + pool->total_bad_removes); + ODP_PRINT(" free_list size=%u min size=%u peak size=%u\n", + pool->free_list_size, pool->min_free_list_size, + pool->peak_free_list_size); }
void _odp_queue_pool_destroy(_odp_int_queue_pool_t queue_pool) diff --git a/platform/linux-generic/odp_sorted_list.c b/platform/linux-generic/odp_sorted_list.c index df604242..511fd090 100644 --- a/platform/linux-generic/odp_sorted_list.c +++ b/platform/linux-generic/odp_sorted_list.c @@ -261,12 +261,12 @@ void _odp_sorted_list_stats_print(_odp_int_sorted_pool_t sorted_pool) sorted_pool_t *pool;
pool = (sorted_pool_t *)(uintptr_t)sorted_pool; - ODP_DBG("sorted_pool=0x%" PRIX64 "\n", sorted_pool); - ODP_DBG(" max_sorted_lists=%u next_list_idx=%u\n", - pool->max_sorted_lists, pool->next_list_idx); - ODP_DBG(" total_inserts=%" PRIu64 " total_deletes=%" PRIu64 - " total_removes=%" PRIu64 "\n", pool->total_inserts, - pool->total_deletes, pool->total_removes); + ODP_PRINT("sorted_pool=0x%" PRIX64 "\n", sorted_pool); + ODP_PRINT(" max_sorted_lists=%u next_list_idx=%u\n", + pool->max_sorted_lists, pool->next_list_idx); + ODP_PRINT(" total_inserts=%" PRIu64 " total_deletes=%" PRIu64 + " total_removes=%" PRIu64 "\n", pool->total_inserts, + pool->total_deletes, pool->total_removes); }
void _odp_sorted_pool_destroy(_odp_int_sorted_pool_t sorted_pool) diff --git a/platform/linux-generic/odp_timer_wheel.c b/platform/linux-generic/odp_timer_wheel.c index 1d0640c5..b37d269b 100644 --- a/platform/linux-generic/odp_timer_wheel.c +++ b/platform/linux-generic/odp_timer_wheel.c @@ -937,10 +937,10 @@ uint32_t _odp_timer_wheel_count(_odp_timer_wheel_t timer_wheel) static void _odp_int_timer_wheel_desc_print(wheel_desc_t *wheel_desc, uint32_t wheel_idx) { - ODP_DBG(" wheel=%u num_slots=%u ticks_shift=%u ticks_per_slot=%u" - " ticks_per_rev=%" PRIu64 "\n", - wheel_idx, wheel_desc->num_slots, wheel_desc->ticks_shift, - wheel_desc->ticks_per_slot, wheel_desc->ticks_per_rev); + ODP_PRINT(" wheel=%u num_slots=%u ticks_shift=%u ticks_per_slot=%u" + " ticks_per_rev=%" PRIu64 "\n", + wheel_idx, wheel_desc->num_slots, wheel_desc->ticks_shift, + wheel_desc->ticks_per_slot, wheel_desc->ticks_per_rev); }
void _odp_timer_wheel_stats_print(_odp_timer_wheel_t timer_wheel) @@ -952,28 +952,30 @@ void _odp_timer_wheel_stats_print(_odp_timer_wheel_t timer_wheel) timer_wheels = (timer_wheels_t *)(uintptr_t)timer_wheel; expired_ring = timer_wheels->expired_timers_ring;
- ODP_DBG("_odp_int_timer_wheel_stats current_ticks=%" PRIu64 "\n", - timer_wheels->current_ticks); + ODP_PRINT("_odp_int_timer_wheel_stats current_ticks=%" PRIu64 "\n", + timer_wheels->current_ticks); for (wheel_idx = 0; wheel_idx < 4; wheel_idx++) _odp_int_timer_wheel_desc_print( &timer_wheels->wheel_descs[wheel_idx], wheel_idx);
- ODP_DBG(" total timer_inserts=%" PRIu64 " timer_removes=%" PRIu64 - " insert_fails=%" PRIu64 "\n", - timer_wheels->total_timer_inserts, - timer_wheels->total_timer_removes, - timer_wheels->insert_fail_cnt); - ODP_DBG(" total_promote_cnt=%" PRIu64 " promote_fail_cnt=%" - PRIu64 "\n", timer_wheels->total_promote_cnt, - timer_wheels->promote_fail_cnt); - ODP_DBG(" free_list_size=%u min_size=%u peak_size=%u\n", - timer_wheels->free_list_size, timer_wheels->min_free_list_size, - timer_wheels->peak_free_list_size); - ODP_DBG(" expired_timers_ring size=%u count=%u " - "peak_count=%u full_cnt=%u\n", - expired_ring->max_idx + 1, expired_ring->count, - expired_ring->peak_count, expired_ring->expired_ring_full_cnt); + ODP_PRINT(" total timer_inserts=%" PRIu64 " timer_removes=%" PRIu64 + " insert_fails=%" PRIu64 "\n", + timer_wheels->total_timer_inserts, + timer_wheels->total_timer_removes, + timer_wheels->insert_fail_cnt); + ODP_PRINT(" total_promote_cnt=%" PRIu64 " promote_fail_cnt=%" + PRIu64 "\n", timer_wheels->total_promote_cnt, + timer_wheels->promote_fail_cnt); + ODP_PRINT(" free_list_size=%u min_size=%u peak_size=%u\n", + timer_wheels->free_list_size, + timer_wheels->min_free_list_size, + timer_wheels->peak_free_list_size); + ODP_PRINT(" expired_timers_ring size=%u count=%u " + "peak_count=%u full_cnt=%u\n", + expired_ring->max_idx + 1, expired_ring->count, + expired_ring->peak_count, + expired_ring->expired_ring_full_cnt); }
void _odp_timer_wheel_destroy(_odp_timer_wheel_t timer_wheel) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 6d957326..ab06b3c0 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -4643,19 +4643,19 @@ void odp_tm_stats_print(odp_tm_t odp_tm) tm_system = GET_TM_SYSTEM(odp_tm); input_work_queue = tm_system->input_work_queue;
- ODP_DBG("odp_tm_stats_print - tm_system=0x%" PRIX64 " tm_idx=%u\n", - odp_tm, tm_system->tm_idx); - ODP_DBG(" input_work_queue size=%u current cnt=%u peak cnt=%u\n", - INPUT_WORK_RING_SIZE, input_work_queue->queue_cnt, - input_work_queue->peak_cnt); - ODP_DBG(" input_work_queue enqueues=%" PRIu64 " dequeues=% " PRIu64 - " fail_cnt=%" PRIu64 "\n", input_work_queue->total_enqueues, - input_work_queue->total_dequeues, - input_work_queue->enqueue_fail_cnt); - ODP_DBG(" green_cnt=%" PRIu64 " yellow_cnt=%" PRIu64 " red_cnt=%" - PRIu64 "\n", tm_system->shaper_green_cnt, - tm_system->shaper_yellow_cnt, - tm_system->shaper_red_cnt); + ODP_PRINT("odp_tm_stats_print - tm_system=0x%" PRIX64 " tm_idx=%u\n", + odp_tm, tm_system->tm_idx); + ODP_PRINT(" input_work_queue size=%u current cnt=%u peak cnt=%u\n", + INPUT_WORK_RING_SIZE, input_work_queue->queue_cnt, + input_work_queue->peak_cnt); + ODP_PRINT(" input_work_queue enqueues=%" PRIu64 " dequeues=% " PRIu64 + " fail_cnt=%" PRIu64 "\n", input_work_queue->total_enqueues, + input_work_queue->total_dequeues, + input_work_queue->enqueue_fail_cnt); + ODP_PRINT(" green_cnt=%" PRIu64 " yellow_cnt=%" PRIu64 " red_cnt=%" + PRIu64 "\n", tm_system->shaper_green_cnt, + tm_system->shaper_yellow_cnt, + tm_system->shaper_red_cnt);
_odp_pkt_queue_stats_print(tm_system->_odp_int_queue_pool); _odp_timer_wheel_stats_print(tm_system->_odp_int_timer_wheel); @@ -4665,14 +4665,14 @@ void odp_tm_stats_print(odp_tm_t odp_tm) for (queue_num = 1; queue_num < max_queue_num; queue_num++) { tm_queue_obj = tm_system->queue_num_tbl[queue_num - 1]; if (tm_queue_obj && tm_queue_obj->pkts_rcvd_cnt != 0) - ODP_DBG("queue_num=%u priority=%u rcvd=%u enqueued=%u " - "dequeued=%u consumed=%u\n", - queue_num, - tm_queue_obj->priority, - tm_queue_obj->pkts_rcvd_cnt, - tm_queue_obj->pkts_enqueued_cnt, - tm_queue_obj->pkts_dequeued_cnt, - tm_queue_obj->pkts_consumed_cnt); + ODP_PRINT("queue_num=%u priority=%u rcvd=%u enqueued=%u " + "dequeued=%u consumed=%u\n", + queue_num, + tm_queue_obj->priority, + tm_queue_obj->pkts_rcvd_cnt, + tm_queue_obj->pkts_enqueued_cnt, + tm_queue_obj->pkts_dequeued_cnt, + tm_queue_obj->pkts_consumed_cnt); } }
-----------------------------------------------------------------------
Summary of changes: example/traffic_mgmt/Makefile.am | 4 +++ example/traffic_mgmt/odp_traffic_mgmt.c | 30 +++++++++++++++++++-- platform/linux-generic/odp_pkt_queue.c | 22 ++++++++-------- platform/linux-generic/odp_sorted_list.c | 12 ++++----- platform/linux-generic/odp_timer_wheel.c | 44 ++++++++++++++++--------------- platform/linux-generic/odp_traffic_mngr.c | 42 ++++++++++++++--------------- 6 files changed, 93 insertions(+), 61 deletions(-)
hooks/post-receive