[PATCH v8 3/6] latencystats: use dynamic logtype
Stephen Hemminger
stephen at networkplumber.org
Mon Aug 14 18:31:22 CEST 2023
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 at intel.com
Signed-off-by: Stephen Hemminger <stephen at 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.2
More information about the dev
mailing list