summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@broadcom.com>2019-10-02 16:25:54 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:31 +0200
commit9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3 (patch)
tree9827d0d97c697284e39a363ca40651f587d0da7c /drivers/net
parent288d51eb188de7cb9cebfcfaf0d38bb283ec6187 (diff)
downloaddpdk-9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3.zip
dpdk-9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3.tar.gz
dpdk-9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3.tar.xz
net/bnxt: check for VNIC ID in rollback
If driver init/probe fails as part of cleanup/rollback, we may end up invoking this HWRM cmd even on an invalid vNIC which will unnecessarily log an error message as the cmd will fail. Check for invalid ID before issuing the HWRM cmd Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 89697b8..e5f8fda 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1965,6 +1965,11 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
if (BNXT_CHIP_THOR(bp))
return 0;
+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
+ PMD_DRV_LOG(DEBUG, "Invalid vNIC ID\n");
+ return 0;
+ }
+
HWRM_PREP(req, VNIC_TPA_CFG, BNXT_USE_CHIMP_MB);
if (enable) {