diff options
Diffstat (limited to 'drivers/net/ena')
-rw-r--r-- | drivers/net/ena/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/ena/base/ena_plat_dpdk.h | 10 | ||||
-rw-r--r-- | drivers/net/ena/ena_ethdev.c | 2 | ||||
-rw-r--r-- | drivers/net/ena/ena_ethdev.h | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/ena/Makefile b/drivers/net/ena/Makefile index ac2b55dc..a0d3358d 100644 --- a/drivers/net/ena/Makefile +++ b/drivers/net/ena/Makefile @@ -54,7 +54,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena_eth_com.c # this lib depends upon: DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_eal lib/librte_ether DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_mempool lib/librte_mbuf -DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_net lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_net CFLAGS += $(INCLUDES) diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index aab2ac86..5f693301 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -93,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)) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 02af67a2..e157587b 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -605,7 +605,6 @@ static void ena_stats_restart(struct rte_eth_dev *dev) rte_atomic64_init(&adapter->drv_stats->ierrors); rte_atomic64_init(&adapter->drv_stats->oerrors); - rte_atomic64_init(&adapter->drv_stats->imcasts); rte_atomic64_init(&adapter->drv_stats->rx_nombuf); } @@ -643,7 +642,6 @@ static void ena_stats_get(struct rte_eth_dev *dev, /* Driver related stats */ stats->ierrors = rte_atomic64_read(&adapter->drv_stats->ierrors); stats->oerrors = rte_atomic64_read(&adapter->drv_stats->oerrors); - stats->imcasts = rte_atomic64_read(&adapter->drv_stats->imcasts); stats->rx_nombuf = rte_atomic64_read(&adapter->drv_stats->rx_nombuf); } diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h index ba6f01e6..aca853c1 100644 --- a/drivers/net/ena/ena_ethdev.h +++ b/drivers/net/ena/ena_ethdev.h @@ -121,7 +121,6 @@ enum ena_adapter_state { struct ena_driver_stats { rte_atomic64_t ierrors; rte_atomic64_t oerrors; - rte_atomic64_t imcasts; rte_atomic64_t rx_nombuf; }; |