From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29FEFA0471 for ; Wed, 17 Jul 2019 12:44:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61AE71BDF5; Wed, 17 Jul 2019 12:42:24 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id CED241B9A8; Wed, 17 Jul 2019 12:42:11 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 9C7E230C0B4; Wed, 17 Jul 2019 03:42:10 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 9C7E230C0B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563360130; bh=KXc2up0syqLnUSk+OQJ1r+Xmr+SNa5mcoggniCZXH7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YEY4/AmPbVqzSZzJ/VLh0cSf61/2l1FDmm6SruHbMBnIoEO2JEGY80CVG4E/tOc/V 41MBRl9TQ7GKPUjUD+XLKCya/iWRbJdvWbM32ccjw3rHZS5Z3HE2w38sfU6di6IG9K SjX8vpGyoMccc1L2mGbpwmBT66oCODAHvyvfRuAA= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.122.43.105]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 9243AAC0749; Wed, 17 Jul 2019 03:42:08 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Somnath Kotur Date: Wed, 17 Jul 2019 16:11:36 +0530 Message-Id: <20190717104139.21155-13-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190717104139.21155-1-ajit.khaparde@broadcom.com> References: <0c1b327c-2c36-652f-c88d-cbca8f873c13@intel.com> <20190717104139.21155-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 12/15] net/bnxt: fix to check for invalid VNIC in cleanup path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP The cleanup/rollback operation post rte_eth_dev_start failure might end up invoking an HWRM cmd even on an invalid vNIC resulting in error messages being logged needlessly. Fix to check for the same before issuing the HWRM cmd. Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 84cda5e6c..1a0265f8a 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2325,6 +2325,11 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp) for (i = bp->nr_vnics - 1; i >= 0; i--) { struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; + if (vnic->fw_vnic_id == INVALID_HW_RING_ID) { + PMD_DRV_LOG(DEBUG, "Invalid vNIC ID\n"); + return; + } + bnxt_clear_hwrm_vnic_flows(bp, vnic); bnxt_clear_hwrm_vnic_filters(bp, vnic); -- 2.20.1 (Apple Git-117)