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

Message ID 20230421181155.2160482-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 success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing fail Unit Testing FAIL
ci/Intel-compilation fail Compilation issues
ci/github-robot: build fail github build: failed
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-unit-testing fail Testing issues

Commit Message

Randy Schacher April 21, 2023, 6: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: Shuanglin Wang <shuanglin.wang@broadcom.com>
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 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;
 	req.hash_type = rte_cpu_to_le_32(vnic->hash_type);