From patchwork Mon Apr 22 15:21:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 139615 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 0B2BB43EDB; Mon, 22 Apr 2024 17:24:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B167540A81; Mon, 22 Apr 2024 17:23:55 +0200 (CEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 7690C406B7 for ; Mon, 22 Apr 2024 17:23:50 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6ed01c63657so3957517b3a.2 for ; Mon, 22 Apr 2024 08:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713799429; x=1714404229; 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=i3+egRrx4JI9E2plWMu17CiEVJ7H/AoXfNFkJLwKwko=; b=TP7bnMRYSz40M7kq+oseGHymVGMlj5EdkbpXL3iprMpj3RkBIfRJnj+Wl/67ZoHD4x lexv3H+w28G7TLyeMq0pWS6dV8FXYM3YsX3e5/IB8aDkeOWdD7rWaWQfkppAdqWCEK+w uwLysugcC+JZoVIHAX+jY0Q2/wSxsNDrmkF8Dibo479vrmHU9sZrtK/OYyDAcRxm4TXT 7oa1NlOuJYvUFIsx2gGTTS05lHmMikpIRCwgvNkDHHr8GoOQFQOl+3ysk47aqu2D8Kdn rH6ypanAQXERKIHVOoX+xu3eR2kKUIotXWRshkqVt/W7NsCt1UYPQl0WC2LkQtZA5AaE NDTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713799429; x=1714404229; 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=i3+egRrx4JI9E2plWMu17CiEVJ7H/AoXfNFkJLwKwko=; b=nTvpcwUkJyPMgprkCu4Ffq7hnpA/dy55aLHxbJeUDQ4dvVNcMSp1qZd2bUBINH1oK7 l6x+MoEZyuIly38RubZemOOCbJy4BkQlZcqEOsL75ZSg7EnWUPXKISOzgN3LVoFHEBZi V8UTPPK1pxi5RRTDjItqM/yD6rpeZOkE4PmtRdBS5seRRYS5luAfUqSNmFvmQ9jNnYW4 /6x0SjjvgWyfX8CcPaNExn389n2xuqyXaO2RX7xc3fbDtwoEwDc3IkflQOGLB0hGeFzt fSg84yBmnjCTheSMWsMqmHKwF/DcTKqN0ausQiSrVGpLYfivihe7MPadu7jNzGal6rwW MJvA== X-Gm-Message-State: AOJu0Yye4IdcOH3ZkF9q6l4tpFf0z9BM9gNLEwgUKamud3+6uhISKjW1 m5pPPc1BtNrWmwwn5CaOwv5Vn2slcDQnnmg90gPPMQNuVIKNKLttDzsEB9fVhN0qp/scDSowJVn e X-Google-Smtp-Source: AGHT+IHHow9ot34WXg8/KPsgx1WBiJluvPuRXlUK5SuHpOa8GX9Fu7iBb6aXzq6KVRUQyD8mym1qOA== X-Received: by 2002:a05:6a20:6a1f:b0:1a9:b2a6:1d23 with SMTP id p31-20020a056a206a1f00b001a9b2a61d23mr11233977pzk.20.1713799429649; Mon, 22 Apr 2024 08:23:49 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id cb17-20020a056a02071100b0060063c4be3bsm1402783pgb.14.2024.04.22.08.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 08:23:49 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Reshma Pattan Subject: [PATCH v5 4/9] latencystats: fix log messages Date: Mon, 22 Apr 2024 08:21:34 -0700 Message-ID: <20240422152336.147553-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422152336.147553-1-stephen@networkplumber.org> References: <20240408195036.182545-1-stephen@networkplumber.org> <20240422152336.147553-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. Reword message for the case where getting info about a port fails and it is skipped. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- lib/latencystats/rte_latencystats.c | 35 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 2140ab87c4..c0ac60134f 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -259,7 +259,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; } @@ -279,8 +279,8 @@ rte_latencystats_init(uint64_t app_samp_intvl, ret = rte_eth_dev_info_get(pid, &dev_info); if (ret != 0) { - LATENCY_STATS_LOG(INFO, - "Error during getting device (port %u) info: %s", + LATENCY_STATS_LOG(NOTICE, + "Can not get info for device (port %u): %s", pid, strerror(-ret)); continue; @@ -291,18 +291,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; @@ -323,10 +323,9 @@ rte_latencystats_uninit(void) ret = rte_eth_dev_info_get(pid, &dev_info); if (ret != 0) { - LATENCY_STATS_LOG(INFO, - "Error during getting device (port %u) info: %s", + LATENCY_STATS_LOG(NOTICE, + "Can not get info for device (port %u): %s", pid, strerror(-ret)); - continue; } @@ -334,17 +333,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); } }