[11/11] net/bnxt: Avoid submitting hwrm rss request when rss mode disabled

Message ID 20230419201122.338133-12-stuart.schacher@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Series sync Truflow support with latest release |


Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing fail Unit Testing FAIL
ci/github-robot: build fail github build: failed
ci/Intel-compilation fail Compilation issues
ci/intel-Testing success Testing PASS

Commit Message

Randy Schacher April 19, 2023, 8:11 p.m. UTC
  From: Shuanglin Wang <shuanglin.wang@broadcom.com>

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: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@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 24a892bacf..d63bf227a6 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;
 	req.hash_type = rte_cpu_to_le_32(vnic->hash_type);