[dpdk-stable] [18.11 3/7] eal: remove legacy PMD log macro

Kevin Traynor ktraynor at redhat.com
Thu Jan 9 14:34:29 CET 2020


From: Stephen Hemminger <stephen at networkplumber.org>

[ upstream commit e7d798172f911b1af74f3c54ef67e8bb18b36284 ]

The RTE_PMD_DEBUG_TRACE was only enabled for EVENTDEV_DEBUG and
that configuration is now handled by RTE_EDEV_LOG macros.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 lib/librte_eal/common/include/rte_dev.h | 41 ++-----------------------
 1 file changed, 2 insertions(+), 39 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 850b03e13..d006b5743 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -44,50 +44,13 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_name,
 					void *cb_arg);
 
-__attribute__((format(printf, 2, 0)))
-static inline void
-rte_pmd_debug_trace(const char *func_name, const char *fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-
-	{
-		char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];
-
-		va_end(ap);
-
-		va_start(ap, fmt);
-		vsnprintf(buffer, sizeof(buffer), fmt, ap);
-		va_end(ap);
-
-		rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s",
-			func_name, buffer);
-	}
-}
-
-/*
- * Enable RTE_PMD_DEBUG_TRACE() when at least one component relying on the
- * RTE_*_RET() macros defined below is compiled in debug mode.
- */
-#if defined(RTE_LIBRTE_EVENTDEV_DEBUG)
-#define RTE_PMD_DEBUG_TRACE(...) \
-	rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...) (void)0
-#endif
-
 /* Macros to check for invalid function pointers */
 #define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \
-	if ((func) == NULL) { \
-		RTE_PMD_DEBUG_TRACE("Function not supported\n"); \
+	if ((func) == NULL) \
 		return retval; \
-	} \
 } while (0)
 
 #define RTE_FUNC_PTR_OR_RET(func) do { \
-	if ((func) == NULL) { \
-		RTE_PMD_DEBUG_TRACE("Function not supported\n"); \
+	if ((func) == NULL) \
 		return; \
-	} \
 } while (0)
 
-- 
2.21.1



More information about the stable mailing list