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 789CDA2E1B for ; Tue, 3 Sep 2019 04:20:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8B3C1EB26; Tue, 3 Sep 2019 04:19:30 +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 579D91E96E for ; Tue, 3 Sep 2019 04:19:09 +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 0CC4E30C1D7; Mon, 2 Sep 2019 19:19:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 0CC4E30C1D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1567477142; bh=R6K3Yyq19FQd6kfXgmhPD8V86EkMIN+BERMntmcpUhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s/I9tdSiGITKWcP27z0GX5vz1Duom80mc3cP9akA5QpflquRKc9QDemIuKxZxiUbj OIw96jSfFnzqu6n7AGZ+2uTO5ljN6PNr3PhgYLRa0m2K6MY2nMfupNRhcKSRMM8qLc 0AvNWeJQveHsKaMpRVRwE0vQc3A/egLAHfgKTP8s= Received: from localhost.localdomain (unknown [10.230.30.225]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 5D745AC078E; Mon, 2 Sep 2019 19:19:08 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Somnath Kotur , Rahul Gupta , Kalesh Anakkur Purayil Date: Mon, 2 Sep 2019 19:18:56 -0700 Message-Id: <20190903021901.25895-13-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190903021901.25895-1-ajit.khaparde@broadcom.com> References: <20190903021901.25895-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 12/17] 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 a033e2d1e..227d893da 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1958,6 +1958,11 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp, return -ENOTSUP; } + 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)