DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, reshma.pattan@intel.com
Subject: [PATCH v7 3/5] latencystats: use dynamic logtype
Date: Tue, 21 Feb 2023 10:55:51 -0800	[thread overview]
Message-ID: <20230221185553.513432-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20230221185553.513432-1-stephen@networkplumber.org>

Libraries should not reuse RTE_LOGTYPE_USER1 for their
logging. Instead they should register their own type.

Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: reshma.pattan@intel.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/latencystats/rte_latencystats.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index 8985a377db4e..f3c1746cca00 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -26,7 +26,8 @@ latencystat_cycles_per_ns(void)
 }
 
 /* Macros for printing using RTE_LOG */
-#define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1
+RTE_LOG_REGISTER_DEFAULT(latencystat_logtype, INFO);
+#define RTE_LOGTYPE_LATENCY_STATS latencystat_logtype
 
 static uint64_t timestamp_dynflag;
 static int timestamp_dynfield_offset = -1;
-- 
2.39.1


  parent reply	other threads:[~2023-02-21 18:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0230208044825.1682620-1-stephen@networkplumber.org>
2023-02-21 18:55 ` [PATCH v7 0/5] Convert us of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-21 18:55   ` [PATCH v7 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-21 18:55   ` [PATCH v7 2/5] reorder: " Stephen Hemminger
2023-02-21 18:55   ` Stephen Hemminger [this message]
2023-02-21 18:55   ` [PATCH v7 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-21 18:55   ` [PATCH v7 5/5] ipsec: fix usage " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230221185553.513432-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).