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 D9B3BA2F18 for ; Thu, 3 Oct 2019 01:28:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E9E601BFE4; Thu, 3 Oct 2019 01:26:39 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 9341F1BF91 for ; Thu, 3 Oct 2019 01:26:10 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id D01B930C298; Wed, 2 Oct 2019 16:24:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com D01B930C298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570058696; bh=BreAU7yHo42UILGfmEvoyJ3MRzi39F8PH5FItg7oIGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R61Y7Xty0wHUw/yKdQS0qMiftT5aLO60sM+s0hCwpMt4Vc7T4iZ8nWypNT/0YlvMw EPMljX/N2uqsxqvFa6FAwUeNfqKT5v+2upZ2MdgrI8vtIhWF3zI/cStmtHTXavQW94 puZfaZVUT5aVXp8LJDBBzKwnS+eZw4PZLxP7xJbc= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 4A847140069; Wed, 2 Oct 2019 16:26:09 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Somnath Kotur , Rahul Gupta , Kalesh Anakkur Purayil Date: Wed, 2 Oct 2019 16:25:54 -0700 Message-Id: <20191002232601.22715-14-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191002232601.22715-1-ajit.khaparde@broadcom.com> References: <20191002232601.22715-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 13/20] net/bnxt: check for invalid VNIC ID in vnic tpa cfg 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: Somnath Kotur 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 unecessarily log an error message as the cmd will fail. Check for invalid ID before issuing the HWRM cmd Signed-off-by: Somnath Kotur Reviewed-by: Rahul Gupta Reviewed-by: Kalesh Anakkur Purayil 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 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) { -- 2.20.1 (Apple Git-117)