From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: stable@dpdk.org
Cc: christian.ehrhardt@canonical.com, ajit.khaparde@broadcom.com
Subject: [PATCH 19.11 1/8] net/bnxt: fix queue stop operation
Date: Mon, 7 Mar 2022 20:40:29 +0530 [thread overview]
Message-ID: <20220307151036.7116-2-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20220307151036.7116-1-kalesh-anakkur.purayil@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
[ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ]
When there are no active Rx queues(i.e when all queues have been
stopped), clear the RSS redirection table of the VNIC on Thor.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 23 +++++++++++++++++++++++
drivers/net/bnxt/bnxt_hwrm.h | 1 +
drivers/net/bnxt/bnxt_rxq.c | 3 +++
3 files changed, 27 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 25e6b8c..6ab8ca7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5258,3 +5258,26 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
return 0;
}
+
+int
+bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+{
+ struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_vnic_rss_cfg_input req = {0};
+ int nr_ctxs = vnic->num_lb_ctxts;
+ int i, rc = 0;
+
+ for (i = 0; i < nr_ctxs; i++) {
+ HWRM_PREP(req, VNIC_RSS_CFG, BNXT_USE_CHIMP_MB);
+
+ req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_grp_ids[i]);
+ req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+ }
+
+ return rc;
+}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 815e61d..bb1762d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -229,4 +229,5 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);
int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index);
int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx,
struct bnxt_ring_stats *stats, bool rx);
+int bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
#endif
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 5fd83c0..b0ab3df 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -538,6 +538,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
if (active_queue_cnt == 0) {
uint16_t saved_mru = vnic->mru;
+ /* clear RSS setting on vnic. */
+ bnxt_vnic_rss_clear_p5(bp, vnic);
+
vnic->mru = 0;
/* Reconfigure default receive ring and MRU. */
bnxt_hwrm_vnic_cfg(bp, vnic);
--
2.10.1
next prev parent reply other threads:[~2022-03-07 15:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 15:10 [PATCH 19.11 0/8] bnxt fixes backport to 19.11 Kalesh A P
2022-03-07 15:10 ` Kalesh A P [this message]
2022-03-07 15:10 ` [PATCH 19.11 2/8] net/bnxt: cap maximum number of unicast MAC addresses Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 3/8] net/bnxt: fix multicast address set Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 4/8] net/bnxt: restore RSS configuration after reset recovery Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 5/8] net/bnxt: fix memzone allocation per VNIC Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 6/8] net/bnxt: fix handling of VF configuration change Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 7/8] net/bnxt: get maximum supported multicast filters count Kalesh A P
2022-03-07 15:10 ` [PATCH 19.11 8/8] net/bnxt: fix xstats names query overrun Kalesh A P
2022-03-09 8:02 ` [PATCH 19.11 0/8] bnxt fixes backport to 19.11 Christian Ehrhardt
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=20220307151036.7116-2-kalesh-anakkur.purayil@broadcom.com \
--to=kalesh-anakkur.purayil@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=christian.ehrhardt@canonical.com \
--cc=stable@dpdk.org \
/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).