[v4,27/31] net/ena: update device-preferred size of rings
Checks
Commit Message
From: Shai Brandes <shaibran@amazon.com>
Update the device-preferred size of the Tx ring to fall within the
valid range when a large LLQ is enabled. For consistency, align the
device-preferred size of the Rx ring accordingly.
Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
@@ -2596,8 +2596,10 @@ static int ena_infos_get(struct rte_eth_dev *dev,
dev_info->tx_desc_lim.nb_mtu_seg_max = RTE_MIN(ENA_PKT_MAX_BUFS,
adapter->max_tx_sgl_size);
- dev_info->default_rxportconf.ring_size = ENA_DEFAULT_RING_SIZE;
- dev_info->default_txportconf.ring_size = ENA_DEFAULT_RING_SIZE;
+ dev_info->default_rxportconf.ring_size = RTE_MIN(ENA_DEFAULT_RING_SIZE,
+ dev_info->rx_desc_lim.nb_max);
+ dev_info->default_txportconf.ring_size = RTE_MIN(ENA_DEFAULT_RING_SIZE,
+ dev_info->tx_desc_lim.nb_max);
dev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;