Skip to contentSkip to conversation

net/ena: remove unused macro

PATCH Applied David Marchand 3 participants 3 messages Oct 23, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ena: remove unused macro

This assert macro is not called anymore.
This also fixes an invalid reference to RTE_LOGTYPE_ERR that does not exist.

Fixes 3adcba9a8987 ("net/ena: update HAL to the newer version")
Fixes 6f1c9df9e9cc ("net/ena: use dynamic log type for debug logging")
---
 drivers/net/ena/base/ena_plat_dpdk.h | 13 -------------
 1 file changed, 13 deletions(-)
drivers/net/ena/base/ena_plat_dpdk.h +0 -13
index ae4fd8f868..a6782f3732 100644
@@ -73,19 +73,6 @@ typedef uint64_t dma_addr_t;
 	(rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
 
 extern int ena_logtype_com;
-#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
-#define ENA_ASSERT(cond, format, arg...)				\
-	do {								\
-		if (unlikely(!(cond))) {				\
-			rte_log(RTE_LOGTYPE_ERR, ena_logtype_com,	\
-				format, ##arg);				\
-			rte_panic("line %d\tassert \"" #cond "\""	\
-					"failed\n", __LINE__);		\
-		}							\
-	} while (0)
-#else
-#define ENA_ASSERT(cond, format, arg...) do {} while (0)
-#endif
 
 #define ENA_MAX_T(type, x, y) RTE_MAX((type)(x), (type)(y))
 #define ENA_MAX32(x, y) ENA_MAX_T(uint32_t, (x), (y))
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#1 lore raw

pt., 23 paź 2020 o 10:44 David Marchand <[email protected]> napisał(a):

Quoted 10 lines

This assert macro is not called anymore.
This also fixes an invalid reference to RTE_LOGTYPE_ERR that does not exist.

Fixes 3adcba9a8987 ("net/ena: update HAL to the newer version")
Fixes 6f1c9df9e9cc ("net/ena: use dynamic log type for debug logging")
Quoted 31 lines
---
 drivers/net/ena/base/ena_plat_dpdk.h | 13 -------------
 1 file changed, 13 deletions(-)
drivers/net/ena/base/ena_plat_dpdk.h +0 -14
index ae4fd8f868..a6782f3732 100644
@@ -73,19 +73,6 @@ typedef uint64_t dma_addr_t;
        (rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
 
 extern int ena_logtype_com;
-#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
-#define ENA_ASSERT(cond, format, arg...)                               \
-       do {                                                            \
-               if (unlikely(!(cond))) {                                \
-                       rte_log(RTE_LOGTYPE_ERR, ena_logtype_com,       \
-                               format, ##arg);                         \
-                       rte_panic("line %d\tassert \"" #cond "\""       \
-                                       "failed\n", __LINE__);          \
-               }                                                       \
-       } while (0)
-#else
-#define ENA_ASSERT(cond, format, arg...) do {} while (0)
-#endif
 
 #define ENA_MAX_T(type, x, y) RTE_MAX((type)(x), (type)(y))
 #define ENA_MAX32(x, y) ENA_MAX_T(uint32_t, (x), (y))
--

2.23.0

Applied
#2 lore raw
Quoted 6 lines · Michał Krawczyk

pt., 23 paź 2020 o 10:44 David Marchand <[email protected]> napisał(a):

Quoted 5 lines

This assert macro is not called anymore.
This also fixes an invalid reference to RTE_LOGTYPE_ERR that does not exist.

Quoted 7 lines
Quoted 5 lines
Fixes 3adcba9a8987 ("net/ena: update HAL to the newer version")
Fixes 6f1c9df9e9cc ("net/ena: use dynamic log type for debug logging")

Applied to dpdk-next-net/main, thanks.