@@ -143,16 +143,16 @@ writeq(uint64_t value, volatile void *addr)
#define IAVF_WRITE_FLUSH(a) IAVF_READ_REG(a, IAVF_VFGEN_RSTAT)
extern int iavf_common_logger;
+#define RTE_LOGTYPE_IAVF_COMMON iavf_common_logger
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IAVF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define iavf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- rte_log(RTE_LOG_DEBUG, iavf_common_logger, \
- "iavf %02x.%x " s, \
+ DEBUGOUT("iavf %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
@@ -25,6 +25,8 @@
#include <rte_io.h>
#include <rte_compat.h>
+#include "../idpf_common_logs.h"
+
#define INLINE inline
#define STATIC static
@@ -108,16 +110,14 @@ typedef struct idpf_lock idpf_lock;
#define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->(f)))
#define MAKEMASK(m, s) ((m) << (s))
-extern int idpf_common_logger;
-
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IDPF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define idpf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "idpf %02x.%x " s, \
+ DEBUGOUT("idpf %02x.%x " s "\n", \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, E1000_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
@@ -34,13 +34,9 @@ extern int e1000_logtype_tx;
#endif
extern int e1000_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_E1000_DRIVER e1000_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
+ RTE_LOG(level, E1000_DRIVER, "%s(): " fmt "\n", __func__, ## args)
/* log init function shared by e1000 and igb drivers */
void e1000_igb_init_log(void);
@@ -24,7 +24,7 @@
#define STATIC static
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, FM10K_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
@@ -33,11 +33,8 @@ extern int fm10k_logtype_tx;
#endif
extern int fm10k_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_FM10K_DRIVER fm10k_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, FM10K_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _FM10K_LOGS_H_ */
@@ -82,8 +82,8 @@ typedef enum i40e_status_code i40e_status;
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-#define DEBUGOUT(S) PMD_DRV_LOG_RAW(DEBUG, S)
-#define DEBUGOUT1(S, A...) PMD_DRV_LOG_RAW(DEBUG, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, I40E_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
+#define DEBUGOUT1 DEBUGOUT
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define DEBUGOUT2 DEBUGOUT1
@@ -94,7 +94,7 @@ typedef enum i40e_status_code i40e_status;
#define i40e_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "i40e %02x.%x " s, \
+ DEBUGOUT("i40e %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
@@ -30,11 +30,8 @@ extern int i40e_logtype_tx;
#endif
extern int i40e_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_I40E_DRIVER i40e_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, I40E_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _I40E_LOGS_H_ */
@@ -149,7 +149,7 @@ writeq(uint64_t value, volatile void *addr)
#define ice_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "ice %02x.%x " s, \
+ RTE_LOG(DEBUG, ICE_DRIVER, "ice %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
@@ -7,6 +7,7 @@
extern int ice_logtype_init;
extern int ice_logtype_driver;
+#define RTE_LOGTYPE_ICE_DRIVER ice_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
@@ -32,11 +33,7 @@ extern int ice_logtype_tx;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, ICE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _ICE_LOGS_H_ */
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000 * (x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IGC_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
@@ -35,12 +35,8 @@ extern int igc_logtype_driver;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, igc_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#ifdef __cplusplus
}
@@ -33,7 +33,7 @@
#define msec_delay(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IXGBE_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
@@ -31,11 +31,8 @@ extern int ixgbe_logtype_tx;
#endif
extern int ixgbe_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_IXGBE_DRIVER ixgbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _IXGBE_LOGS_H_ */