[PATCH 4/4] net/bnxt: fix RSS hash mode configuration for VFs
Kishore Padmanabha
kishore.padmanabha at broadcom.com
Thu Jun 4 19:42:10 CEST 2026
On Wed, Jun 3, 2026 at 1:50 PM Mohammad Shuab Siddique <
mohammad-shuab.siddique at broadcom.com> wrote:
> From: Mohammad Shuab Siddique <mohammad-shuab.siddique at 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.
>
> Cc: stable at dpdk.org
> Signed-off-by: Mohammad Shuab Siddique <
> mohammad-shuab.siddique at broadcom.com>
>
Acked-by: Kishore Padmanabha <kishore.padmanabha at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20260604/decb5167/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5493 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20260604/decb5167/attachment-0001.bin>
More information about the dev
mailing list