From: Somnath Kotur Date: Wed, 2 Oct 2019 23:25:54 +0000 (-0700) Subject: net/bnxt: check for VNIC ID in rollback X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3;p=dpdk.git 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 Signed-off-by: Ajit Khaparde Reviewed-by: Rahul Gupta Reviewed-by: Kalesh AP --- diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 89697b83ac..e5f8fda9a3 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) {