Skip to contentSkip to conversation

net/xsc: add log macro

PATCH Superseded WanRenyong 1 participant 1 message Sep 6, 2024 Network drivers

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

WanRenyong

author
#0 lore raw

PATCH 2/19 net/xsc: add log macro

Add log macro to print runtime messages and trace functions.

---
 drivers/net/xsc/xsc_ethdev.c | 11 +++++++++
 drivers/net/xsc/xsc_log.h    | 44 ++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 drivers/net/xsc/xsc_log.h
drivers/net/xsc/xsc_ethdev.c +11 -0
index 0e48cb76fa..58ceaa3940 100644
@@ -1,3 +1,14 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright 2024 Yunsilicon Technology Co., Ltd.
  */
+
+#include "xsc_log.h"
+
+RTE_LOG_REGISTER_SUFFIX(xsc_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(xsc_logtype_driver, driver, NOTICE);
+#ifdef RTE_ETHDEV_DEBUG_RX
+RTE_LOG_REGISTER_SUFFIX(xsc_logtype_rx, rx, DEBUG);
+#endif
+#ifdef RTE_ETHDEV_DEBUG_TX
+RTE_LOG_REGISTER_SUFFIX(xsc_logtype_tx, tx, DEBUG);
+#endif
drivers/net/xsc/xsc_log.h new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.25.1