On 8/29/2022 9:41 AM, Junfeng Guo wrote:
Add GVE PMD logs.
Add some MACRO definitions and memory operations which are specific
for DPDK.
Signed-off-by: Haiyue Wang <haiyue.w...@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun...@intel.com>
Signed-off-by: Junfeng Guo <junfeng....@intel.com>
<...>
diff --git a/drivers/net/gve/gve_logs.h b/drivers/net/gve/gve_logs.h
new file mode 100644
index 0000000000..a050253f59
--- /dev/null
+++ b/drivers/net/gve/gve_logs.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Intel Corporation
+ */
+
+#ifndef _GVE_LOGS_H_
+#define _GVE_LOGS_H_
+
+extern int gve_logtype_init;
+extern int gve_logtype_driver;
+
+#define PMD_INIT_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, gve_logtype_init, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define PMD_DRV_LOG_RAW(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, gve_logtype_driver, "%s(): " fmt, \
+ __func__, ## args)
+ > +#define PMD_DRV_LOG(level, fmt, args...) \
+ PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+
Why 'PMD_DRV_LOG_RAW' is needed, why not directly use 'PMD_DRV_LOG'?
Do you really need two different log types? How do you differentiate
'init' & 'driver' types? As far as I can see there is mixed usage of them.