From patchwork Fri Apr 19 17:28:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 139550 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16EC243EB2; Fri, 19 Apr 2024 19:30:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B00A40A77; Fri, 19 Apr 2024 19:29:46 +0200 (CEST) Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by mails.dpdk.org (Postfix) with ESMTP id B1C7040698 for ; Fri, 19 Apr 2024 19:29:40 +0200 (CEST) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-22efc6b8dc5so1397477fac.0 for ; Fri, 19 Apr 2024 10:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713547780; x=1714152580; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rD+AnQQVFckf+DeZeU85+tMHpx0KOMG8lHuLZS0zp18=; b=BlfLk3hChM9rrHVPdO5Kz+/lQq6ZsRmmX+f2/4TRlvDIG7PZdQMgfCC4hKAcU/WIx7 n4ar+MJogghphKHCO2tq0SDcDbalbomQJ/YhRZ/HBqoq7bCgYq2BQ58ZEAGhM/xBfqTv zvQTedlF68YRGw9VgIJWGOQk6wXwoawHPGmADcP+jF4CZWXHpAUxcK9srQyp/Md6D8F/ fMwbt6zPwbRAObKRr+va6hWvyni1ew2AebgeagutNvLtxIdjf2Hlwcl7Hh/oFqaikwgD NxXMRBgIWpERtvX2VTMrdCv6qZl3+tDjXPjt/7r9q1clMLZfoLDoUNsn+oQf4NPTxCua 3APw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713547780; x=1714152580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rD+AnQQVFckf+DeZeU85+tMHpx0KOMG8lHuLZS0zp18=; b=Cu8b7x/P6lYYQTFGFdZ0TWd1FBpjiAB3WDsLTKVB14MrhNcg0PQdI0wbCbVcxgvYeU q2WF2H5UoBVWIYTPmSie8nCvUEmqw+96yidUYD+a7P/6Bc24QlsliX1/FHCC3Sth2CpI KRDQezNSFWdCg99m01fUTfm973nRUNuFvkEDH4QvDLSOnwAOpBtpkjgwZEfhQ+BA8MA1 7XwBy918Yr95Wr6W/xFeR6Fj7G5eH0YqrXjHDq3HX21vd8Wgw8YY7LzJ+M9cggWQwwMX Xb000ZBFn6r9+/p8t33XB+sgYlzKjR/ELVo6rptJzjTwz5+HY1DPh/iuAP+IJMHxIlpd k9Ug== X-Gm-Message-State: AOJu0YzbrFoxe1nVXTjRAyTzh/km8oCN3iguTfVd+dd/bqvKqJr0Xu8R Yv8f7G1iVQLGBI5DO7Dw+HohVH3jc2FVEFHk2E+xmsXu9e9y9dcle6P8YVzGJvEy4c+abFNa248 v X-Google-Smtp-Source: AGHT+IFOslDQAeGOPkjtK9uBhxb5SIhGCbJpL0acvBvju7AqPt1g2fiuRV6G3yq1Xg101k6KCDD1tQ== X-Received: by 2002:a05:6870:231a:b0:220:8bd2:cd09 with SMTP id w26-20020a056870231a00b002208bd2cd09mr3087473oao.32.1713547780054; Fri, 19 Apr 2024 10:29:40 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id h16-20020a632110000000b005f3c5cf33b5sm3383074pgh.37.2024.04.19.10.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 10:29:39 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Reshma Pattan Subject: [PATCH v4 4/6] latencystats: fix log messages Date: Fri, 19 Apr 2024 10:28:24 -0700 Message-ID: <20240419172926.55447-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419172926.55447-1-stephen@networkplumber.org> References: <20240408195036.182545-1-stephen@networkplumber.org> <20240419172926.55447-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org All messages that because of an error should be at log level NOTICE or above. Do not break log messages across lines. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- lib/latencystats/rte_latencystats.c | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 6ef8e344bf..8aff96a449 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -243,7 +243,7 @@ rte_latencystats_init(uint64_t app_samp_intvl, latency_stats_index = rte_metrics_reg_names(ptr_strings, NUM_LATENCY_STATS); if (latency_stats_index < 0) { - LATENCY_STATS_LOG(DEBUG, + LATENCY_STATS_LOG(ERR, "Failed to register latency stats names"); return -1; } @@ -263,7 +263,7 @@ rte_latencystats_init(uint64_t app_samp_intvl, ret = rte_eth_dev_info_get(pid, &dev_info); if (ret != 0) { - LATENCY_STATS_LOG(INFO, + LATENCY_STATS_LOG(NOTICE, "Error during getting device (port %u) info: %s", pid, strerror(-ret)); @@ -275,18 +275,18 @@ rte_latencystats_init(uint64_t app_samp_intvl, cbs->cb = rte_eth_add_first_rx_callback(pid, qid, add_time_stamps, user_cb); if (!cbs->cb) - LATENCY_STATS_LOG(INFO, "Failed to " - "register Rx callback for pid=%d, " - "qid=%d", pid, qid); + LATENCY_STATS_LOG(NOTICE, + "Failed to register Rx callback for pid=%u, qid=%u", + pid, qid); } for (qid = 0; qid < dev_info.nb_tx_queues; qid++) { cbs = &tx_cbs[pid][qid]; cbs->cb = rte_eth_add_tx_callback(pid, qid, calc_latency, user_cb); if (!cbs->cb) - LATENCY_STATS_LOG(INFO, "Failed to " - "register Tx callback for pid=%d, " - "qid=%d", pid, qid); + LATENCY_STATS_LOG(NOTICE, + "Failed to register Tx callback for pid=%u, qid=%u", + pid, qid); } } return 0; @@ -307,7 +307,7 @@ rte_latencystats_uninit(void) ret = rte_eth_dev_info_get(pid, &dev_info); if (ret != 0) { - LATENCY_STATS_LOG(INFO, + LATENCY_STATS_LOG(NOTICE, "Error during getting device (port %u) info: %s", pid, strerror(-ret)); @@ -318,17 +318,17 @@ rte_latencystats_uninit(void) cbs = &rx_cbs[pid][qid]; ret = rte_eth_remove_rx_callback(pid, qid, cbs->cb); if (ret) - LATENCY_STATS_LOG(INFO, "failed to " - "remove Rx callback for pid=%d, " - "qid=%d", pid, qid); + LATENCY_STATS_LOG(NOTICE, + "Failed to remove Rx callback for pid=%u, qid=%u", + pid, qid); } for (qid = 0; qid < dev_info.nb_tx_queues; qid++) { cbs = &tx_cbs[pid][qid]; ret = rte_eth_remove_tx_callback(pid, qid, cbs->cb); if (ret) - LATENCY_STATS_LOG(INFO, "failed to " - "remove Tx callback for pid=%d, " - "qid=%d", pid, qid); + LATENCY_STATS_LOG(NOTICE, + "Failed to remove Tx callback for pid=%u, qid=%u", + pid, qid); } }