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;
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;
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);
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);