[PATCH v4 11/11] net/bnxt: set RSS config based on RSS mode

Ajit Khaparde ajit.khaparde at broadcom.com
Wed Jun 28 18:29:27 CEST 2023


From: Shuanglin Wang <shuanglin.wang at broadcom.com>

Avoid submitting hwrm RSS request when rss mode disabled.
On WH+, if rss mode isn't enabled, then there is no rss context.
Submitting HWRM_VNIC_RSS_CFG request to firmware would hit a failure.

The fix is to check the rss context. If no rss context, then don't
submit the hwrm request.

Signed-off-by: Shuanglin Wang <shuanglin.wang at broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b944547656..06f196760f 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2405,6 +2405,9 @@ bnxt_hwrm_vnic_rss_cfg_non_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
 	int rc = 0;
 
+	if (vnic->num_lb_ctxts == 0)
+		return rc;
+
 	HWRM_PREP(&req, HWRM_VNIC_RSS_CFG, BNXT_USE_CHIMP_MB);
 
 	req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
-- 
2.39.2 (Apple Git-143)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4218 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20230628/c4264b0f/attachment-0001.bin>


More information about the dev mailing list