Skip to contentSkip to conversation

ixgbe: fix build with bypass and debug enabled

PATCH In review Thomas Monjalon 2 participants 3 messages Dec 1, 2014 – Dec 2, 2014 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: fix build with bypass and debug enabled

Since commit aae1047905621 ("use the right debug macro"), DEBUGOUT was replaced by PMD_DRV_LOG which requires at least 2 arguments. But the level argument was missing.

Commit 7a10de5e27 fixed the logs but not the macros FUNC_PTR_OR_* which are not preprocessed if RTE_LIBRTE_IXGBE_DEBUG_DRIVER is disabled.

---
 lib/librte_pmd_ixgbe/ixgbe_bypass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe_bypass.c +2 -2
index 15203a4..832f415 100644
@@ -42,7 +42,7 @@
 /* Macros to check for invlaid function pointers. */
 #define	FUNC_PTR_OR_ERR_RET(func, retval) do {              \
 	if ((func) == NULL) {                               \
-		PMD_DRV_LOG("%s:%d function not supported", \
+		PMD_DRV_LOG(ERR, "%s:%d function not supported", \
 			    __func__, __LINE__);            \
 		return retval;                            \
 	}                                                   \
@@ -50,7 +50,7 @@
 
 #define	FUNC_PTR_OR_RET(func) do {                          \
 	if ((func) == NULL) {                               \
-		PMD_DRV_LOG("%s:%d function not supported", \
+		PMD_DRV_LOG(ERR, "%s:%d function not supported", \
 			    __func__, __LINE__);            \
 		return;                                     \
 	}                                                   \
Signature · 1 line
2.1.3

A message that is not in the archive (sent off-list or not yet received): 1417455659-24854-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 30 lines · Thomas Monjalon

Since commit aae1047905621 ("use the right debug macro"), DEBUGOUT was replaced by PMD_DRV_LOG which requires at least 2 arguments. But the level argument was missing.

Commit 7a10de5e27 fixed the logs but not the macros FUNC_PTR_OR_* which are not preprocessed if RTE_LIBRTE_IXGBE_DEBUG_DRIVER is disabled.

---
 lib/librte_pmd_ixgbe/ixgbe_bypass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe_bypass.c +1 -1
index 15203a4..832f415 100644
@@ -42,7 +42,7 @@
 /* Macros to check for invlaid function pointers. */
 #define        FUNC_PTR_OR_ERR_RET(func, retval) do {              \
        if ((func) == NULL) {                               \
-               PMD_DRV_LOG("%s:%d function not supported", \
+               PMD_DRV_LOG(ERR, "%s:%d function not supported", \
                            __func__, __LINE__);            \
                return retval;                            \
        }                                                   \

lib/librte_pmd_ixgbe/ixgbe_bypass.c line 56

Quoted 8 lines
lib/librte_pmd_ixgbe/ixgbe_bypass.c +1 -1
@@ -50,7 +50,7 @@
 
 #define        FUNC_PTR_OR_RET(func) do {                          \
        if ((func) == NULL) {                               \
-               PMD_DRV_LOG("%s:%d function not supported", \
+               PMD_DRV_LOG(ERR, "%s:%d function not supported", \
                            __func__, __LINE__);            \
                return;                                     \
        }                                                   \

Argh ... good catch.
Looks like these were the only places with this error (I did some grep and only found those).
And ok with the ERR level, it looks fine to me.

Ack.
Thanks Thomas.

Signature · 1 line
David Marchand

A message that is not in the archive (sent off-list or not yet received): CALwxeUu3w1nJbKedtwSbqZzDvfG8kO5xEEUkSd0Rk13pSjdmWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author Applied
#4 lore raw
Quoted 7 lines
Quoted 7 lines

Since commit aae1047905621 ("use the right debug macro"), DEBUGOUT was replaced by PMD_DRV_LOG which requires at least 2 arguments. But the level argument was missing.

Commit 7a10de5e27 fixed the logs but not the macros FUNC_PTR_OR_* which are not preprocessed if RTE_LIBRTE_IXGBE_DEBUG_DRIVER is disabled.

Quoted 8 lines
Quoted 1 line

Argh ... good catch.
Looks like these were the only places with this error (I did some grep and only found those).
And ok with the ERR level, it looks fine to me.

Ack.

Applied

Signature · 1 line
Thomas