net/bnxt: fix queues per VNIC
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Wed, 24 Feb 2021 15:55:46 +0000 (21:25 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 12 Mar 2021 06:00:21 +0000 (07:00 +0100)
commitc23190303efd6884eaeeda7afe23c2a158f4c1ee
tree716f85a9517f052f6244986d65d7c58b0c71942c
parent46413898cf1df5798b8d1ea04522da0f0ce97205
net/bnxt: fix queues per VNIC

Update queues per VNIC in single queue mode.
bp->rx_num_qs_per_vnic is not initialized in the single queue mode.
As a result of this when an interface is reconfigured to single
queue mode from an existing multiqueue mode, bp->rx_num_qs_per_vnic
is not updated to the value of 1. Hence, the driver will try to
access more than one queue resulting in a crash.

This patch fixes it by initializing bp->rx_num_qs_per_vnic in the
single queue mode as well.

Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxq.c