net/vmxnet3: ignore empty segments in reception
[dpdk.git] / drivers / net / sfc / sfc_log.h
index 6daab1c..d6f3435 100644 (file)
@@ -25,6 +25,12 @@ extern uint32_t sfc_logtype_driver;
 /** Name prefix for the per-device log type used to report basic information */
 #define SFC_LOGTYPE_MAIN_STR   SFC_LOGTYPE_PREFIX "main"
 
+/** Device MCDI log type name prefix */
+#define SFC_LOGTYPE_MCDI_STR   SFC_LOGTYPE_PREFIX "mcdi"
+
+/** Level value used by MCDI log statements */
+#define SFC_LOG_LEVEL_MCDI     RTE_LOG_INFO
+
 /* Log PMD message, automatically add prefix and \n */
 #define SFC_LOG(sa, level, type, ...) \
        do {                                                            \
@@ -84,4 +90,13 @@ extern uint32_t sfc_logtype_driver;
                                RTE_FMT_TAIL(__VA_ARGS__ ,)));          \
        } while (0)
 
+#define sfc_log_mcdi(sa, ...) \
+       do {                                                            \
+               const struct sfc_adapter *_sa = (sa);                   \
+                                                                       \
+               SFC_LOG(_sa, SFC_LOG_LEVEL_MCDI, _sa->mcdi.logtype,     \
+                       __VA_ARGS__);                                   \
+       } while (0)
+
+
 #endif /* _SFC_LOG_H_ */