DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
To: dev@dpdk.org
Cc: kishore.padmanabha@broadcom.com, stable@dpdk.org,
	Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
Subject: [PATCH v2 4/4] net/bnxt: fix RSS hash mode configuration for VFs
Date: Thu,  4 Jun 2026 16:56:22 -0600	[thread overview]
Message-ID: <20260604225622.2285191-5-Mohammad-Shuab.Siddique@broadcom.com> (raw)
In-Reply-To: <20260604225622.2285191-1-Mohammad-Shuab.Siddique@broadcom.com>

From: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>

Fixed VFs attempting global RSS configuration which is not
permitted by firmware. VFs (including trusted VFs) must use
per-VNIC RSS configuration with actual vnic_id and rss_ctx_idx
values.

Fixes: 8b9adaf0da6b ("net/bnxt: support RSS on ESP and AH headers")
Cc: stable@dpdk.org
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 0c82935de9..afc948ac29 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2970,8 +2970,22 @@ bnxt_hwrm_vnic_rss_cfg_hash_mode_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic
 		req.hash_mode_flags = BNXT_HASH_MODE_INNERMOST;
 	else
 		req.hash_mode_flags = vnic->hash_mode;
-	req.vnic_id = rte_cpu_to_le_16(BNXT_DFLT_VNIC_ID_INVALID);
-	req.rss_ctx_idx = rte_cpu_to_le_16(BNXT_RSS_CTX_IDX_INVALID);
+
+	/* VFs must use actual vnic_id for per-VNIC configuration.
+	 * PFs can use INVALID vnic_id for global configuration.
+	 * This is because VFs don't have permission to configure
+	 * global hash mode, even if they're trusted.
+	 */
+	if (BNXT_VF(bp)) {
+		req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
+		req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_grp_ids[0]);
+		PMD_DRV_LOG_LINE(DEBUG, "VF using per-VNIC RSS config (vnic_id=%u)",
+				vnic->fw_vnic_id);
+	} else {
+		req.vnic_id = rte_cpu_to_le_16(BNXT_DFLT_VNIC_ID_INVALID);
+		req.rss_ctx_idx = rte_cpu_to_le_16(BNXT_RSS_CTX_IDX_INVALID);
+		PMD_DRV_LOG_LINE(DEBUG, "PF using global RSS config");
+	}
 
 	PMD_DRV_LOG_LINE(DEBUG, "RSS CFG: Hash level %d", req.hash_mode_flags);
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
-- 
2.47.3


  parent reply	other threads:[~2026-06-04 22:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 17:51 [PATCH 0/4] net/bnxt: miscellaneous bug fixes Mohammad Shuab Siddique
2026-06-03 17:51 ` [PATCH 1/4] net/bnxt: modify check for short Tx BDs Mohammad Shuab Siddique
2026-06-04 17:36   ` Kishore Padmanabha
2026-06-03 17:51 ` [PATCH 2/4] net/bnxt: fix QP resource count in backing store config Mohammad Shuab Siddique
2026-06-04 17:41   ` Kishore Padmanabha
2026-06-03 17:51 ` [PATCH 3/4] net/bnxt: remove implicit integer sign-extension Mohammad Shuab Siddique
2026-06-04 17:41   ` Kishore Padmanabha
2026-06-03 17:51 ` [PATCH 4/4] net/bnxt: fix RSS hash mode configuration for VFs Mohammad Shuab Siddique
2026-06-04 17:42   ` Kishore Padmanabha
2026-06-03 18:36 ` [PATCH v2] " Mohammad Shuab Siddique
2026-06-03 20:02 ` [PATCH v3 4/4] " Mohammad Shuab Siddique
2026-06-03 21:44   ` Stephen Hemminger
2026-06-04 22:56 ` [PATCH v2 0/4] net/bnxt: miscellaneous bug fixes Mohammad Shuab Siddique
2026-06-04 22:56   ` [PATCH v2 1/4] net/bnxt: modify check for short Tx BDs Mohammad Shuab Siddique
2026-06-04 22:56   ` [PATCH v2 2/4] net/bnxt: fix QP resource count in backing store config Mohammad Shuab Siddique
2026-06-04 22:56   ` [PATCH v2 3/4] net/bnxt: remove implicit integer sign-extension Mohammad Shuab Siddique
2026-06-04 22:56   ` Mohammad Shuab Siddique [this message]
2026-06-10 18:17   ` [PATCH v2 0/4] net/bnxt: miscellaneous bug fixes Kishore Padmanabha

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=20260604225622.2285191-5-Mohammad-Shuab.Siddique@broadcom.com \
    --to=mohammad-shuab.siddique@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.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