DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Lance Richardson <lance.richardson@broadcom.com>
Subject: [dpdk-dev] [PATCH v2 1/4] net/bnxt: fix RSS table update for start/stop rxq
Date: Mon,  4 Nov 2019 15:02:22 -0800	[thread overview]
Message-ID: <20191104230225.98450-2-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191104230225.98450-1-ajit.khaparde@broadcom.com>

From: Lance Richardson <lance.richardson@broadcom.com>

A previous commit made updating of the RSS table when a receive
queue is stopped/started conditional on vnic->rx_queue_cnt being
nonzero. This count is only nonzero for dynamically created VNICs,
so the RSS table was not being updated in the normal path.
Fix by restoring the original logic.

Also ensure that vnic->rx_queue_cnt is initialized to zero when
reinitializing the VNIC array.

Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c  | 6 ++----
 drivers/net/bnxt/bnxt_vnic.c | 1 +
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 6420281d3..ab889c10e 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -466,8 +466,7 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		}
 
 		PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n", vnic->rx_queue_cnt);
-		if (vnic->rx_queue_cnt > 1)
-			rc = bnxt_vnic_rss_configure(bp, vnic);
+		rc = bnxt_vnic_rss_configure(bp, vnic);
 	}
 
 	if (rc == 0)
@@ -522,8 +521,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 			vnic->fw_grp_ids[rx_queue_id] = INVALID_HW_RING_ID;
 
 		PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n", vnic->rx_queue_cnt);
-		if (vnic->rx_queue_cnt > 1)
-			rc = bnxt_vnic_rss_configure(bp, vnic);
+		rc = bnxt_vnic_rss_configure(bp, vnic);
 	}
 
 	if (rc == 0)
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 412a53dc0..52a4badfc 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -51,6 +51,7 @@ static void bnxt_init_vnics(struct bnxt *bp)
 		vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
 		vnic->hash_mode =
 			HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
+		vnic->rx_queue_cnt = 0;
 
 		STAILQ_INIT(&vnic->filter);
 		STAILQ_INIT(&vnic->flow_list);
-- 
2.21.0 (Apple Git-122)


  reply	other threads:[~2019-11-04 23:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 20:27 [dpdk-dev] [PATCH 0/4] net/bnxt: rxq stop/start fixes Lance Richardson
2019-11-04 20:27 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix RSS table update for start/stop rxq Lance Richardson
2019-11-04 20:27 ` [dpdk-dev] [PATCH 2/4] net/bnxt: keep consistent rxq start/stop state Lance Richardson
2019-11-04 20:27 ` [dpdk-dev] [PATCH 3/4] net/bnxt: release hwrm lock before returning Lance Richardson
2019-11-04 20:27 ` [dpdk-dev] [PATCH 4/4] net/bnxt: fix rxq start/stop for Thor based NICs Lance Richardson
2019-11-04 20:30 ` [dpdk-dev] [PATCH 0/4] net/bnxt: rxq stop/start fixes Lance Richardson
2019-11-04 23:02   ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2019-11-04 23:02     ` Ajit Khaparde [this message]
2019-11-04 23:02     ` [dpdk-dev] [PATCH v2 2/4] net/bnxt: keep consistent rxq start/stop state Ajit Khaparde
2019-11-04 23:02     ` [dpdk-dev] [PATCH v2 3/4] net/bnxt: release hwrm lock before returning Ajit Khaparde
2019-11-04 23:02     ` [dpdk-dev] [PATCH v2 4/4] net/bnxt: fix rxq start/stop for Thor based NICs Ajit Khaparde
2019-11-04 23:13     ` [dpdk-dev] [PATCH v2 0/4] net/bnxt: rxq stop/start 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=20191104230225.98450-2-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lance.richardson@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).