net/bnxt: fix Rx queue pool calculation
PATCH 1/1 net/bnxt: fix Rx queue pool calculation
When the number of Rx queues requested by the application is less than the number of pools calculated, we end up calling HWRM_VNIC_ALLOC with incorrect parameters. This causes the firmware to return an error. Fix the Rx queue pool calculation.
--- drivers/net/bnxt/bnxt_rxq.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_rxq.c +1 -0
@@ -104,6 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp) pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools; } + pools =RTE_MIN (pools, bp->rx_cp_nr_rings); nb_q_per_grp = bp->rx_cp_nr_rings / pools; bp->rx_num_qs_per_vnic = nb_q_per_grp; PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
Signature · 1 line
2.21.0 (Apple Git-122.2)
Quoted 11 lines · Ajit Khaparde
When the number of Rx queues requested by the application is less than the number of pools calculated, we end up calling
HWRM_VNIC_ALLOCwith incorrect parameters. This causes the firmware to return an error. Fix the Rx queue pool calculation.Fixes 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutivegroup ids")
Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Somnath Kotur <[email protected]>
Patch applied to dpdk-next-net-brcm
Quoted 20 lines
--- drivers/net/bnxt/bnxt_rxq.c | 1 + 1 file changed, 1 insertion(+)drivers/net/bnxt/bnxt_rxq.c +1
-1@@ -104,6 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp) pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : pools; } + pools =RTE_MIN (pools, bp->rx_cp_nr_rings); nb_q_per_grp = bp->rx_cp_nr_rings / pools; bp->rx_num_qs_per_vnic = nb_q_per_grp; PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n", --2.21.0 (Apple Git-122.2)
Quoted 11 lines · Ajit Khaparde
On Mon, Nov 18, 2019 at 12:32 PM Ajit Khaparde <[email protected] <mailto:[email protected]>> wrote:
When the number of Rx queues requested by the application is less than the number of pools calculated, we end up calling
HWRM_VNIC_ALLOCwith incorrect parameters. This causes the firmware to return an error. Fix the Rx queue pool calculation.Fixes 10bb6ddc2984 ("net/bnxt: fix flow creation with non-consecutive group
Quoted 8 lines
ids")
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Reviewed-by Somnath Kotur <[email protected]<mailto:[email protected]>>
Patch applied to dpdk-next-net-brcm
Squashed into relevant commit in next-net, thanks.