From patchwork Thu May 26 23:46:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 68725 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp659639qge; Thu, 26 May 2016 16:51:41 -0700 (PDT) X-Received: by 10.237.46.230 with SMTP id k93mr11586299qtd.11.1464306701304; Thu, 26 May 2016 16:51:41 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v63si15011873qkv.212.2016.05.26.16.51.41; Thu, 26 May 2016 16:51:41 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F09B26744E; Thu, 26 May 2016 23:51:40 +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, 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 4A6FF6106B; Thu, 26 May 2016 23:48:40 +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 9C07867444; Thu, 26 May 2016 23:48:34 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by lists.linaro.org (Postfix) with ESMTPS id F081767459 for ; Thu, 26 May 2016 23:47:05 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id j1so149240956oih.3 for ; Thu, 26 May 2016 16:47:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mmUSy6Q8xFDpvHOMZR3e31k7E0zVFn7Q5t7RLHe7nLI=; b=b/jxJyZzbIVlLqZP/lzoWFSg+eWt7U4o+iCU1sWlQ4Xqf2RQHpB8dyimMuZLkJ8bIb LVpPhHE80q6eLr/7kPKxE1EMkHLVDH38eiyDI+G5vascQEK9XG925v8KJ9rmk1q0ftlv OuA9NEKcA7NiKZy/T2HZIMFF/W8zGOdXMolteiYaLF2ey99KuE4kI683hbC02GwpsT9r AYLlGATrZCUBZXja1m0AKpQ5RXeVllf2ZtSoQ2d3uyAfXhnUTtyFnhMFZnZGebWLOQwc 7qM4TytE6sSK3r8QuuL7O4DDZwFhrGx3rjtS6weSKamUVUUFkLu6akPheq0b+N0+D6sX EcRQ== X-Gm-Message-State: ALyK8tJoo5xNS8NK2MkfhNWDgHGD5TQcwmK4Xcw2GF8q59dW9MPxPylXkfqm0wnDHuxQevIJeB8= X-Received: by 10.157.31.36 with SMTP id x33mr8269902otd.26.1464306425361; Thu, 26 May 2016 16:47:05 -0700 (PDT) Received: from localhost.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id c7sm7720581oia.8.2016.05.26.16.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 16:47:04 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 26 May 2016 18:46:49 -0500 Message-Id: <1464306409-7325-11-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464306409-7325-1-git-send-email-bill.fischofer@linaro.org> References: <1464306409-7325-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 10/10] linux-generic: tm: replace printf with odp_dbg calls 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_traffic_mngr.c | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index db74ceb..0b37142 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -769,7 +769,7 @@ static void tm_block_pkt(tm_system_t *tm_system, tm_queue_obj->timer_shaper, pkt_desc); else if (tm_queue_obj->timer_reason != NO_CALLBACK) - printf("%s timer_reason != NO_CALLBACK\n", __func__); + ODP_DBG("%s timer_reason != NO_CALLBACK\n", __func__); tm_queue_obj->blocked_cnt = 1; tm_queue_obj->blocked_scheduler = schedulers_obj; @@ -797,8 +797,8 @@ static odp_bool_t delay_pkt(tm_system_t *tm_system, rc = _odp_timer_wheel_insert(tm_system->_odp_int_timer_wheel, wakeup_time, timer_context); if (rc < 0) { - printf("%s odp_timer_wheel_insert() failed rc=%d\n", - __func__, rc); + ODP_DBG("%s odp_timer_wheel_insert() failed rc=%d\n", + __func__, rc); return false; } @@ -1036,7 +1036,7 @@ static odp_bool_t run_sched(tm_system_t *tm_system, new_sched_state = &schedulers_obj->sched_states[priority]; prev_best_pkt_desc = new_sched_state->smallest_pkt_desc; if (pkt_descs_equal(new_pkt_desc, &prev_best_pkt_desc)) { - printf("%s spurious execution ****\n", __func__); + ODP_DBG("%s spurious execution ****\n", __func__); return false; } } @@ -1488,7 +1488,7 @@ static odp_bool_t tm_consume_pkt_desc(tm_system_t *tm_system, shaper_is_empty = new_shaper_pkt.queue_num == 0; if (pkt_descs_equal(&new_shaper_pkt, sent_pkt_desc)) - printf("%s shaper has old pkt_desc\n", __func__); + ODP_DBG("%s shaper has old pkt_desc\n", __func__); tm_node_obj = shaper_obj->next_tm_node; while (!tm_node_obj->is_root_node) { /* not at egress */ @@ -1498,7 +1498,7 @@ static odp_bool_t tm_consume_pkt_desc(tm_system_t *tm_system, /* Verify that the scheduler output is the sent_pkt_desc. */ if (pkt_descs_not_equal(&prev_sched_pkt, sent_pkt_desc)) { - printf("%s sched has bad out pkt_desc\n", __func__); + ODP_DBG("%s sched has bad out pkt_desc\n", __func__); return false; } @@ -1516,17 +1516,17 @@ static odp_bool_t tm_consume_pkt_desc(tm_system_t *tm_system, sched_is_empty = new_sched_pkt.queue_num == 0; if (pkt_descs_equal(&new_sched_pkt, sent_pkt_desc)) - printf("%s sched has old pkt_desc\n", __func__); + ODP_DBG("%s sched has old pkt_desc\n", __func__); if (pkt_descs_equal(&new_sched_pkt, sent_pkt_desc)) - printf("%s scheduler has old pkt_desc\n", __func__); + ODP_DBG("%s scheduler has old pkt_desc\n", __func__); shaper_obj = &tm_node_obj->shaper_obj; prev_shaper_pkt = shaper_obj->out_pkt_desc; /* Verify that the shaper output is the sent_pkt_desc. */ if (pkt_descs_not_equal(&prev_shaper_pkt, sent_pkt_desc)) { - printf("%s shaper has bad out pkt_desc\n", __func__); + ODP_DBG("%s shaper has bad out pkt_desc\n", __func__); return false; } @@ -1543,7 +1543,7 @@ static odp_bool_t tm_consume_pkt_desc(tm_system_t *tm_system, shaper_is_empty = new_shaper_pkt.queue_num == 0; if (pkt_descs_equal(&new_shaper_pkt, sent_pkt_desc)) - printf("%s shaper has old pkt_desc\n", __func__); + ODP_DBG("%s shaper has old pkt_desc\n", __func__); tm_node_obj = shaper_obj->next_tm_node; } @@ -2110,8 +2110,8 @@ static int tm_process_input_work_queue(tm_system_t *tm_system, for (cnt = 1; cnt <= pkts_to_process; cnt++) { rc = input_work_queue_remove(input_work_queue, &work_item); if (rc < 0) { - printf("%s input_work_queue_remove() failed\n", - __func__); + ODP_DBG("%s input_work_queue_remove() failed\n", + __func__); return rc; } @@ -2176,7 +2176,7 @@ static int tm_process_expired_timers(tm_system_t *tm_system, if (tm_queue_obj->timer_cancels_outstanding != 0) tm_queue_obj->timer_cancels_outstanding--; else - printf("%s bad timer return\n", __func__); + ODP_DBG("%s bad timer return\n", __func__); return work_done; } @@ -2260,8 +2260,8 @@ static int thread_affinity_get(odp_cpumask_t *odp_cpu_mask) CPU_ZERO(&linux_cpu_set); rc = sched_getaffinity(0, sizeof(cpu_set_t), &linux_cpu_set); if (rc != 0) { - printf("%s sched_getaffinity failed with rc=%d\n", - __func__, rc); + ODP_DBG("%s sched_getaffinity failed with rc=%d\n", + __func__, rc); return -1; } @@ -2514,8 +2514,8 @@ static int affinitize_main_thread(void) if (rc == 0) g_main_thread_cpu = cpu_num; else - printf("%s sched_setaffinity failed with rc=%d\n", - __func__, rc); + ODP_DBG("%s sched_setaffinity failed with rc=%d\n", + __func__, rc); return rc; } @@ -2558,7 +2558,7 @@ static int tm_thread_create(tm_system_t *tm_system) rc = pthread_create(&thread, &attr, tm_system_thread, tm_system); if (rc != 0) - printf("Failed to start thread on cpu num=%u\n", cpu_num); + ODP_DBG("Failed to start thread on cpu num=%u\n", cpu_num); return rc; }