DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com
Subject: [dpdk-dev] [PATCH 04/11] net/bnxt: update number of queues per vnic in single queue mode
Date: Wed, 24 Feb 2021 21:25:46 +0530	[thread overview]
Message-ID: <20210224155553.26893-5-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20210224155553.26893-1-kalesh-anakkur.purayil@broadcom.com>

From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>

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 Kumar 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 f46b10c..53a9b52 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.10.1


  parent reply	other threads:[~2021-02-24 15:34 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 15:55 [dpdk-dev] [PATCH 00/11] bnxt fixes Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 01/11] net/bnxt: remove unused macro Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 02/11] net/bnxt: fix vnic configuration Kalesh A P
2021-03-10 13:13   ` Ferruh Yigit
2021-03-10 13:15     ` Ferruh Yigit
2021-02-24 15:55 ` [dpdk-dev] [PATCH 03/11] net/bnxt: remove extra blank line Kalesh A P
2021-02-24 15:55 ` Kalesh A P [this message]
2021-02-24 15:55 ` [dpdk-dev] [PATCH 05/11] net/bnxt: update HWRM structures Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 06/11] net/bnxt: update to new version of backing store Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 07/11] net/bnxt: log port id in async events Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 08/11] net/bnxt: handle echo request async message Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 09/11] net/bnxt: fix firmware fatal error handling Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 10/11] net/bnxt: fix fw readiness check during recovery Kalesh A P
2021-02-24 15:55 ` [dpdk-dev] [PATCH 11/11] net/bnxt: fix PTP support for thor Kalesh A P
2021-03-03 21:25 ` [dpdk-dev] [PATCH 00/11] bnxt fixes Ajit Khaparde
2021-03-10 13:18 ` Ferruh Yigit
2021-03-10 21:26   ` [dpdk-dev] [PATCH v2 00/12] " Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 01/12] devtools: update word list Ajit Khaparde
2021-03-12  0:08       ` Ferruh Yigit
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 02/12] net/bnxt: remove unused macro Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 03/12] net/bnxt: fix VNIC configuration Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 04/12] net/bnxt: remove extra blank line Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 05/12] net/bnxt: fix queues per VNIC Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 06/12] net/bnxt: update HWRM structures Ajit Khaparde
2021-03-12  0:08       ` Ferruh Yigit
2021-03-12  0:17         ` Ajit Khaparde
2021-03-12  0:26           ` Ferruh Yigit
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 07/12] net/bnxt: update to new version of backing store Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 08/12] net/bnxt: log port id in async events Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 09/12] net/bnxt: handle echo request async message Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 10/12] net/bnxt: fix firmware fatal error handling Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 11/12] net/bnxt: fix FW readiness check during recovery Ajit Khaparde
2021-03-10 21:26     ` [dpdk-dev] [PATCH v2 12/12] net/bnxt: fix PTP support for Thor Ajit Khaparde
2021-03-11 17:15     ` [dpdk-dev] [PATCH v2 00/12] bnxt fixes Ajit Khaparde
2021-03-12  5:58       ` [dpdk-dev] [PATCH v3 " Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 01/12] devtools: update word list Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 02/12] net/bnxt: remove unused macro Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 03/12] net/bnxt: fix VNIC configuration Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 04/12] net/bnxt: remove extra blank line Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 05/12] net/bnxt: fix queues per VNIC Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 06/12] net/bnxt: update HWRM structures Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 07/12] net/bnxt: update to new version of backing store Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 08/12] net/bnxt: log port id in async events Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 09/12] net/bnxt: handle echo request async message Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 10/12] net/bnxt: fix firmware fatal error handling Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 11/12] net/bnxt: fix FW readiness check during recovery Ajit Khaparde
2021-03-12  5:58         ` [dpdk-dev] [PATCH v3 12/12] net/bnxt: fix PTP support for Thor Ajit Khaparde
2021-03-12 15:19         ` [dpdk-dev] [PATCH v3 00/12] bnxt fixes 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=20210224155553.26893-5-kalesh-anakkur.purayil@broadcom.com \
    --to=kalesh-anakkur.purayil@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.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).