net/bnxt: limit queue count for NS3/Stingray devices
Cap max queue count to 128 for NS3 devices and ensure that same count is reported as part of dev_info_get_op as well Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
This commit is contained in:
parent
aadae082ee
commit
f03e66cb64
@ -608,6 +608,13 @@ struct bnxt {
|
||||
uint16_t max_cp_rings;
|
||||
uint16_t max_tx_rings;
|
||||
uint16_t max_rx_rings;
|
||||
#define MAX_STINGRAY_RINGS 128U
|
||||
#define BNXT_MAX_RINGS(bp) \
|
||||
(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \
|
||||
MAX_STINGRAY_RINGS), \
|
||||
bp->max_stat_ctx) : \
|
||||
RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx))
|
||||
|
||||
uint16_t max_nq_rings;
|
||||
uint16_t max_l2_ctx;
|
||||
uint16_t max_rx_em_flows;
|
||||
|
@ -505,7 +505,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
|
||||
if (BNXT_PF(bp))
|
||||
dev_info->max_vfs = pdev->max_vfs;
|
||||
|
||||
max_rx_rings = RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx);
|
||||
max_rx_rings = BNXT_MAX_RINGS(bp);
|
||||
/* For the sake of symmetry, max_rx_queues = max_tx_queues */
|
||||
dev_info->max_rx_queues = max_rx_rings;
|
||||
dev_info->max_tx_queues = max_rx_rings;
|
||||
|
@ -296,7 +296,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (queue_idx >= bp->max_rx_rings) {
|
||||
if (queue_idx >= BNXT_MAX_RINGS(bp)) {
|
||||
PMD_DRV_LOG(ERR,
|
||||
"Cannot create Rx ring %d. Only %d rings available\n",
|
||||
queue_idx, bp->max_rx_rings);
|
||||
|
@ -90,7 +90,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (queue_idx >= bp->max_tx_rings) {
|
||||
if (queue_idx >= BNXT_MAX_RINGS(bp)) {
|
||||
PMD_DRV_LOG(ERR,
|
||||
"Cannot create Tx ring %d. Only %d rings available\n",
|
||||
queue_idx, bp->max_tx_rings);
|
||||
|
Loading…
Reference in New Issue
Block a user