From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5606A43E94; Wed, 17 Apr 2024 19:09:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9E174281D; Wed, 17 Apr 2024 19:09:19 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 80A4D427D9 for ; Wed, 17 Apr 2024 19:09:14 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1e5b6e8f662so44721795ad.0 for ; Wed, 17 Apr 2024 10:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713373754; x=1713978554; 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=dONGRsVr9t79ONbmDKjHuRqpBb+5qzOoIok5RkRuGXE=; b=fdw5Hb9epOUcsGKD/PO8HmoOOhFHr9ZrdiGaTVtfocCtyMx/KciZuVh0r9Ad1mDs9P hGC0HlqtnEnII7gTXJONZO3jg8yjJUb6so7FTEFcOPM2UGkjcqp61JXevjgx5NKKdGom 1LSQFIFPtQ8RksCrddnwAqYXaLrjHMAF7s1bKPDlm1jl2dFRn0quNZJTQFOl/e0ip0rS MTdHY7pwSvJpEln9iCUaahM+R4rPOD5rbpfGQdzta2b9z05CP1X5CGIRIWY0uJGZJCA7 KY6g58nw33maojXF0/ycZaNmuYpJW2JdJvZShtitHOMuNxpnrU+zrjhiGA1ygu0jL1tH 38tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713373754; x=1713978554; 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=dONGRsVr9t79ONbmDKjHuRqpBb+5qzOoIok5RkRuGXE=; b=cxVfnqn5gcgcG90CWFXkkriAsAtig4Mhq5gGG5zZ56hxYSCbyFm5g0KTugFCxWPuhY noPOYByPG7ViRXeUA/Q8QPEwGjsJS5z29xgbjmqT4G5IFYe7W/gNOBN7mJ7iUOGCv1Es pqdW082hrdi7jyLoLIfeuudrQzhan4pjdh1wYQVhSk2jzPcdpDrpQeh9odjfjHeLxYHu vbd+hjWoPoCoBkuxlMk5TDhWPlco0SILeoAfdEICo8qvaWVgGdtkwJEK8olEOdkOKlNX upPWKwT2LN+O9Ha/age0Aw4b2qlEI61h8Qx/4T/6gou3lhP8Rs56sHGQkDlhr/qhIG6V M1UQ== X-Gm-Message-State: AOJu0YzMGHTWWxbKxpMkXwzY5+B77CKt69fUU+YCnwkRAjMOrwssQW+q OyZHuOz6ZkciNLBbD+PyDZ0osY17XSLZFob8VIuxxhdD5wWvWRrGbok43QNOjJHmcSWmYw3GZ4p C X-Google-Smtp-Source: AGHT+IHqRU+AVpdZbh8EhvI7ClewaJbOdtZk3JOmKt0oGDDvC4SgkFA3NlVa0izH6hc8I9kpzWeLRg== X-Received: by 2002:a17:902:7b82:b0:1e6:413:9df1 with SMTP id w2-20020a1709027b8200b001e604139df1mr71465pll.41.1713373753773; Wed, 17 Apr 2024 10:09:13 -0700 (PDT) Received: from hermes.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id l5-20020a170903120500b001e4458831afsm11832442plh.227.2024.04.17.10.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:09:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v3 4/5] latencystats: fix log messages Date: Wed, 17 Apr 2024 10:07:26 -0700 Message-ID: <20240417170908.76701-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240417170908.76701-1-stephen@networkplumber.org> References: <0240408195036.182545-1-stephen@networkplumber.org> <20240417170908.76701-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 11bd0ea4ae..62038a9f5d 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -235,7 +235,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; } @@ -255,7 +255,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)); @@ -267,18 +267,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; @@ -299,7 +299,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)); @@ -310,17 +310,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); } } -- 2.43.0