From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id A01035B2C for ; Mon, 30 Jul 2018 18:16:20 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAq6-00009D-FO; Mon, 30 Jul 2018 16:16:06 +0000 From: Christian Ehrhardt To: Jay Ding Cc: Randy Schacher , Ajit Khaparde , dpdk stable Date: Mon, 30 Jul 2018 18:11:49 +0200 Message-Id: <20180730161342.16566-64-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/bnxt: check for invalid vNIC id' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:16:20 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From c27d1824fabd3dce04c66abbbe7adf15665ddca1 Mon Sep 17 00:00:00 2001 From: Jay Ding Date: Thu, 28 Jun 2018 13:15:38 -0700 Subject: [PATCH] net/bnxt: check for invalid vNIC id [ upstream commit e9950366d08f20e4d968fd76dcd0d5bc8afc09a0 ] Passing an invalid fw_vnic_id to the firmware will cause the bnxt_hwrm_vnic_plcmode_cfg command to fail. Add a check for VNIC id before sending message to firmware. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Signed-off-by: Jay Ding Reviewed-by: Randy Schacher Reviewed-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 f441d4610..fcd7c51cf 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1560,6 +1560,11 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp, struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr; uint16_t size; + if (vnic->fw_vnic_id == INVALID_HW_RING_ID) { + PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id); + return rc; + } + HWRM_PREP(req, VNIC_PLCMODES_CFG); req.flags = rte_cpu_to_le_32( -- 2.17.1