From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>,
stable@dpdk.org, Somnath Kotur <somnath.kotur@broadcom.com>,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: [dpdk-stable] [PATCH v3 05/12] net/bnxt: fix queues per VNIC
Date: Thu, 11 Mar 2021 21:58:12 -0800 [thread overview]
Message-ID: <20210312055819.52789-6-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20210312055819.52789-1-ajit.khaparde@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]
From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index f46b10c1c5..53a9b52a46 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -106,7 +106,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
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",
pools, nb_q_per_grp);
start_grp_id = 0;
@@ -165,6 +164,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
}
out:
+ bp->rx_num_qs_per_vnic = nb_q_per_grp;
+
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2021-03-12 5:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACZ4nhtnEg+YVCB0dtH24Q0XywynXeeQgFfVUzAFiPco4ZaKew@mail.gmail.com>
[not found] ` <20210312055819.52789-1-ajit.khaparde@broadcom.com>
2021-03-12 5:58 ` [dpdk-stable] [PATCH v3 02/12] net/bnxt: remove unused macro Ajit Khaparde
2021-03-12 5:58 ` [dpdk-stable] [PATCH v3 03/12] net/bnxt: fix VNIC configuration Ajit Khaparde
2021-03-12 5:58 ` Ajit Khaparde [this message]
2021-03-12 5:58 ` [dpdk-stable] [PATCH v3 10/12] net/bnxt: fix firmware fatal error handling Ajit Khaparde
2021-03-12 5:58 ` [dpdk-stable] [PATCH v3 11/12] net/bnxt: fix FW readiness check during recovery Ajit Khaparde
2021-03-12 5:58 ` [dpdk-stable] [PATCH v3 12/12] net/bnxt: fix PTP support for Thor Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210312055819.52789-6-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=stable@dpdk.org \
--cc=venkatkumar.duvvuru@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).