app/pdump: fix type casting of ring size
[dpdk.git] / drivers / net / ena / base / ena_plat_dpdk.h
index e245e34..5f69330 100644 (file)
@@ -57,6 +57,9 @@ typedef uint16_t u16;
 typedef uint8_t u8;
 
 typedef uint64_t dma_addr_t;
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
 
 #define ena_atomic32_t rte_atomic32_t
 #define ena_mem_handle_t void *
@@ -90,14 +93,18 @@ typedef uint64_t dma_addr_t;
 #define ENA_GET_SYSTEM_USECS()                                         \
        (rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
 
+#if RTE_LOG_LEVEL >= RTE_LOG_DEBUG
 #define ENA_ASSERT(cond, format, arg...)                               \
        do {                                                            \
                if (unlikely(!(cond))) {                                \
-                       printf("Assertion failed on %s:%s:%d: " format, \
-                       __FILE__, __func__, __LINE__, ##arg);           \
-                       rte_exit(EXIT_FAILURE, "ASSERTION FAILED\n");   \
+                       RTE_LOG(ERR, PMD, 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_MAX32(x, y) RTE_MAX((x), (y))
 #define ENA_MAX16(x, y) RTE_MAX((x), (y))