From patchwork Thu Oct 12 17:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115658 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2160338qgn; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RYEuA/io2a35yv64Lsd5yUY6rPSlpyEKbhLBPst/FAk/X0GmDryPxCiQ7jVD+19U4EPFhH X-Received: by 10.107.11.27 with SMTP id v27mr4149045ioi.179.1507827710400; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507827710; cv=none; d=google.com; s=arc-20160816; b=CmPdB+VMfNa49DvbB+NYr8N92GAGbBWWORHxFoiSq8G90VrQkHtggSZyhclsFBqxgC WKpJwf7aPW0rw/wm6/z/aUmdY3J0jw871hogs2lEnPek4aTLYJwnFdt7xrtD8NkXIy+3 X6iy+ctFPQ3oxLVy30GS+Dz+4/S0YtI9aeht/w6/rYXmi2WtpJtlKGJ/T/Ak+IS0ri6h MhroXmPYzz4DKm1y3nqUUHZzgL+rS36vHuEGvBUeHSKAZ1l0Ej5ajF/ssEMgqg72JdoB 9sqdJnJ5YKK/YuP6CjritVlGlPKGcvzHhUGG7jL8Ffd7ybmCC+p5006lE3H3ZbEhfq06 tAdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=tsp/WyBffXdRQiAtK/atRXqXV3sTcYHaM3GWrB6HeVs=; b=J4N5Io0ivUXiuhYKdEOz/6tfmY91YlUkvxXjfc7WR+S/ACqPx2GNocKW2w/Cm7RB0d JH7X79Q5Cn78QuEPhVySL9Av4RTDEI6nOGTmw0JjPmD5d6Pg9RN+7n1a2rPdgObBc3U/ RlJzOJ9NLYnkf52dgQonGDK7NN1iQAMfxhlyKhb9jH2rW6dWA1c8ZuTSZ+3Ti3zDOAZx M4bKrCKqlZufXZC15EQbffUp4YLuG+wdKh4eXYBl6ZIWYeFlfYH7JPno2MqjNfmXrYDJ Zm+bH8MsdMW1Ba+sMMo1RS+hPEDDEM+cHrBlKIxJYGMIdD1zDKoVDyqdfEL10hfpNGRn MWkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id u7si423876itd.45.2017.10.12.10.01.48; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id CE86060B45; Thu, 12 Oct 2017 17:01:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6806660972; Thu, 12 Oct 2017 17:01:34 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A17A260A52; Thu, 12 Oct 2017 17:01:29 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id DB6F160972 for ; Thu, 12 Oct 2017 17:00:51 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 6030142A72 for ; Thu, 12 Oct 2017 20:00:50 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Sg7CISm9AY-0inWSkOp; Thu, 12 Oct 2017 20:00:44 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jEAUUqMMpg-0hm4vjF6; Thu, 12 Oct 2017 20:00:43 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 12 Oct 2017 20:00:03 +0300 Message-Id: <1507827605-6030-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> References: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 229 Subject: [lng-odp] [PATCH v1 1/3] linux-gen: odp_tm_stats_print should not depend on debug X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov 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 --- /** Email created from pull request 229 (muvarov:master_bug3024) ** https://github.com/Linaro/odp/pull/229 ** Patch: https://github.com/Linaro/odp/pull/229.patch ** Base sha: b529f843814f70068de2090e02df632113afa800 ** Merge commit sha: b5f6031413a826cccfaa4468b62e2f3e90a12fff **/ 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 ++++++++++++++--------------- 4 files changed, 61 insertions(+), 59 deletions(-) diff --git a/platform/linux-generic/odp_pkt_queue.c b/platform/linux-generic/odp_pkt_queue.c index 613e39dd0..4f6a1eb61 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 df6042425..511fd090e 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 1d0640c55..b37d269bd 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 6d9573263..ab06b3c0d 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); } } From patchwork Thu Oct 12 17:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115660 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2162184qgn; Thu, 12 Oct 2017 10:03:11 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCBW3l6Hvk7chtzoTDEFLq7wzEWrguzerKMJcQP3DHas2CgmYWIYfI2T2YvKcvRuU7rS3M8 X-Received: by 10.107.164.105 with SMTP id n102mr4296961ioe.45.1507827791115; Thu, 12 Oct 2017 10:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507827791; cv=none; d=google.com; s=arc-20160816; b=zQNC+Sm86KCC1+ueo2y+bLwASSlbBoTbPc898osi4t9BowW6IhURF2E0atJtZOL9Oy cw0f0NOqC+IW0/JxfqZttPRzma2Y0L79svMbD45MlDAhGHFh9TdNi32lK7hBTqX6cbdS yHXif0TBuo9t5vPcYl65uQVHjO6fa5r6mnJmujwzpw5fWPbGCi8C+chpB4AmwIJIf3y2 68pHgAgEDXQOY7nIjSjpwWK8EojqFWSUdDLIiVuxRe4bUnPkupUzpliFuce+1NRwfoiH F2wws8GjSxt7BQUMtQJk7JGRzjAByGyLTfMDzyklwYpcgOVnF2FLAkZQuWdlWCU6VP8b ISdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=a/sfnUxIZlp3oWSX8x+hFo4KbzNqcnLq0ZydDRgiTc8=; b=lF3fIgskaMtsKrujQLtwD1wh84peDnbHLQo/0x0+7hXUlz/tLLTu/DkjrzSMX/58Tg U6CS+q2hOvBzUss9sA09E2IgnHVEzcmW6EOfEdvcw6bnbJynYLbQymKGYeaQ7QdM1gvP uEUKhkIsBQvoI2/mXKoUE2i0Nqb3fa7imB4vpi0yzeoY7NlHB/ThFHqa6um2T5CImBmA wP+Gr+bIPTeYyyZ03Pc0/8FAR8lWixP6XrldmNGpl/Z4UAyHLoEwO58TPNl1p3qycScY O6slCfFlhf4PnOm8UKTUFJ5dLOyK0ZE61dryc9d3nAeQqwmyB/wvRoolohKnBnWeYy5t vM3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id j140si11546038ioj.384.2017.10.12.10.03.07; Thu, 12 Oct 2017 10:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A854660BFB; Thu, 12 Oct 2017 17:03:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 511D160A46; Thu, 12 Oct 2017 17:01:42 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D35576097C; Thu, 12 Oct 2017 17:01:31 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id 4F4B46064C for ; Thu, 12 Oct 2017 17:00:59 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 180715880F1C for ; Thu, 12 Oct 2017 20:00:51 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id LKfWKIXczp-0pHClsnW; Thu, 12 Oct 2017 20:00:51 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jEAUUqMMpg-0om4qwqo; Thu, 12 Oct 2017 20:00:50 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 12 Oct 2017 20:00:04 +0300 Message-Id: <1507827605-6030-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> References: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 229 Subject: [lng-odp] [PATCH v1 2/3] example: traffic_mgmt add clean termination path X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov 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 --- /** Email created from pull request 229 (muvarov:master_bug3024) ** https://github.com/Linaro/odp/pull/229 ** Patch: https://github.com/Linaro/odp/pull/229.patch ** Base sha: b529f843814f70068de2090e02df632113afa800 ** Merge commit sha: b5f6031413a826cccfaa4468b62e2f3e90a12fff **/ example/traffic_mgmt/odp_traffic_mgmt.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/example/traffic_mgmt/odp_traffic_mgmt.c b/example/traffic_mgmt/odp_traffic_mgmt.c index c83b61522..1f1102ddf 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; } From patchwork Thu Oct 12 17:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115659 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2161419qgn; Thu, 12 Oct 2017 10:02:37 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDIf5FbJZoHMjiNYBZY8yIv9Fsg3fjrMBovfrtxPd2Xqtrhc7KzAK/jeGtW+ZnRgjC/ZnUj X-Received: by 10.107.8.207 with SMTP id h76mr4264894ioi.270.1507827757442; Thu, 12 Oct 2017 10:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507827757; cv=none; d=google.com; s=arc-20160816; b=Q0BZn8ZJ04dukKd0Prnqu9rAG4X5o/JYEIlCFwy7m/gk2doTCd3UTvdn8hQ15Xt+0w 6mzFCkiy0u0EkmyHEtmKctBnqKNvaSBTger43DTCLrPdEZxTwdDIiqgg9hI97RjPHYof Y0VtTI9s4xbtTv7BLkqh+Bqu30R2puCU4mi3COsd6VJLqm/J8/UlGp/q1whX8zS28FFG L89Vs2TpVMrEyoELVRei7senTiwfx16aTUPVLsDkjzNsMW0wWOlmi1ch4191mFO+Xzz7 NNjrSL7QM2tp1mpmq0ioprETlZG3VfXms3W3w0gQPvBzwT44E01UACWQGKC52mXPCZ4B zhpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=pb+jiBtWFxYsGB5GY9cXc9fxHqkvOpMLWFIUZb6Gl2Q=; b=Y7gjZZX2PhvK0enkqBwbHFQni9F03mXxGe4t2o7/pjDqcPlLrEz+iNz/jFHjV7pUb/ 0lLABOgA9eZJJPezu1tOahNKgBYbUAI56hNY4wgV0G2QPcSBYDryKVrw5us41wjA+lhe E5SMLbVpvEGycQXp3coo6j+GTcGGdg+YzRu2lPkK3KOH0gOZ0r0EOgwGlMTt/0b4hsFE gJwnuTzGXQb0amUlgY3oEGl9ErtANh3dYLF3qXIV7D7E98lVvh3wAJo8kg/JSsYQH8Uy +UrVl32EBnXm68j/Y+sjXgI8Ze7opTbocullQhz7CpHgSYJSPpxcwoEmWBHL1c6J+H8/ rn5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id n62si463701itc.91.2017.10.12.10.02.36; Thu, 12 Oct 2017 10:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id E224960BE0; Thu, 12 Oct 2017 17:02:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E7D8360999; Thu, 12 Oct 2017 17:01:37 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B947A6098E; Thu, 12 Oct 2017 17:01:29 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 34FED6098E for ; Thu, 12 Oct 2017 17:00:53 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward103p.mail.yandex.net (Yandex) with ESMTP id C99F52185174 for ; Thu, 12 Oct 2017 20:00:51 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FRXqJta1nt-0ph48Kx4; Thu, 12 Oct 2017 20:00:51 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jEAUUqMMpg-0pmqlQ3m; Thu, 12 Oct 2017 20:00:51 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 12 Oct 2017 20:00:05 +0300 Message-Id: <1507827605-6030-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> References: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 229 Subject: [lng-odp] [PATCH v1 3/3] example: traffic_mgmt: add to make check X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov add traffic_mgmt example to make check https://bugs.linaro.org/show_bug.cgi?id=3024 Signed-off-by: Maxim Uvarov --- /** Email created from pull request 229 (muvarov:master_bug3024) ** https://github.com/Linaro/odp/pull/229 ** Patch: https://github.com/Linaro/odp/pull/229.patch ** Base sha: b529f843814f70068de2090e02df632113afa800 ** Merge commit sha: b5f6031413a826cccfaa4468b62e2f3e90a12fff **/ example/traffic_mgmt/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/traffic_mgmt/Makefile.am b/example/traffic_mgmt/Makefile.am index c8ff79755..145065bbd 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