From 0992a5c89a3f2052abaaa76b9e026c7edfbd1e2c Mon Sep 17 00:00:00 2001 From: Marc Richards Date: Thu, 28 Apr 2022 01:30:14 +0000 Subject: [PATCH] Remove invalid ring size alignment logic The previous logic was invalid. The RTE_ETH_DEV_FALLBACK_RX_RINGSIZE (and the TX counterpart) are values that rte_eth_rx_queue_setup() will set if dev_info.default_rxportconf.ring_size is 0 and user provided 0 in nb_rx_desc argument. However the current code treats it as a hint for the PMD to change the ring size to internal defaults. Backported from https://github.com/DPDK/dpdk/commit/30a6c7ef4054. --- drivers/net/ena/ena_ethdev.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 3eb38165cc..22e73f469a 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1255,9 +1255,6 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev, return -EINVAL; } - if (nb_desc == RTE_ETH_DEV_FALLBACK_TX_RINGSIZE) - nb_desc = adapter->tx_ring_size; - txq->port_id = dev->data->port_id; txq->next_to_clean = 0; txq->next_to_use = 0; @@ -1326,9 +1323,6 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev, return ENA_COM_FAULT; } - if (nb_desc == RTE_ETH_DEV_FALLBACK_RX_RINGSIZE) - nb_desc = adapter->rx_ring_size; - if (!rte_is_power_of_2(nb_desc)) { RTE_LOG(ERR, PMD, "Unsupported size of RX queue: %d is not a power of 2.\n",