net/ena: report default ring size
authorStanislaw Kardach <kda@semihalf.com>
Tue, 11 May 2021 06:45:53 +0000 (08:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 May 2021 13:00:44 +0000 (15:00 +0200)
commit30a6c7ef4054e1f4fcc6bd68606c5991c324f08c
tree76c75923a20a1bc2322a433f50015705bec3bedb
parent072b9f2bbc2402a8c86194fe9e11458c1605540a
net/ena: report default ring size

Remove invalid ring size alignment logic and add default Rx and Tx port
ring sizes to the device info spec.

The logic in lines 1297 and 1371 is invalid. The
RTE_ETH_DEV_FALLBACK_RX_RINGSIZE (and the TX counterpart) is a value
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.

Additionally since the ENA_DEFAULT_RING_SIZE is defined, report it in
the device capabilities so that both rte_ethdev code and the user can
utilize it for device configuration.

Fixes: ea93d37eb49d ("net/ena: add HW queues depth setup")
Cc: stable@dpdk.org
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
drivers/net/ena/ena_ethdev.c