Also can remove unused RTE_LOGTYPE_METER
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/common/eal_common_log.c | 2 --
lib/eal/include/rte_log.h | 4 ++--
lib/sched/rte_pie.c | 1 +
lib/sched/rte_sched.c | 5 +++++
lib/sched/rte_sched_log.h | 4 ++++
5 files changed, 12 insertions(+), 4 deletions(-)
create mode 100644 lib/sched/rte_sched_log.h
@@ -351,8 +351,6 @@ static const struct logtype logtype_strings[] = {
{RTE_LOGTYPE_EAL, "lib.eal"},
{RTE_LOGTYPE_PMD, "pmd"},
{RTE_LOGTYPE_HASH, "lib.hash"},
- {RTE_LOGTYPE_METER, "lib.meter"},
- {RTE_LOGTYPE_SCHED, "lib.sched"},
{RTE_LOGTYPE_PORT, "lib.port"},
{RTE_LOGTYPE_TABLE, "lib.table"},
{RTE_LOGTYPE_PIPELINE, "lib.pipeline"},
@@ -37,8 +37,8 @@ extern "C" {
/* was RTE_LOGTYPE_KNI */
/* was RTE_LOGTYPE_ACL */
/* was RTE_LOGTYPE_POWER */
-#define RTE_LOGTYPE_METER 11 /**< Log related to QoS meter. */
-#define RTE_LOGTYPE_SCHED 12 /**< Log related to QoS port scheduler. */
+ /* was RTE_LOGTYPE_METER */
+ /* was RTE_LOGTYPE_SCHED */
#define RTE_LOGTYPE_PORT 13 /**< Log related to port. */
#define RTE_LOGTYPE_TABLE 14 /**< Log related to table. */
#define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <string.h>
+#include "rte_sched_log.h"
#include "rte_pie.h"
#ifdef __INTEL_COMPILER
@@ -16,9 +16,12 @@
#include <rte_reciprocal.h>
#include "rte_sched.h"
+#include "rte_sched_log.h"
#include "rte_sched_common.h"
+
#include "rte_approx.h"
+
#ifdef __INTEL_COMPILER
#pragma warning(disable:2259) /* conversion may lose significant bits */
#endif
@@ -3002,3 +3005,5 @@ rte_sched_port_dequeue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint
return count;
}
+
+RTE_LOG_REGISTER_DEFAULT(sched_logtype, INFO);
new file mode 100644
@@ -0,0 +1,4 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+
+extern int sched_logtype;
+#define RTE_LOGTYPE_SCHED sched_logtype