From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 23/31] net/bnxt: check for invalid vnic id Date: Tue, 26 Jun 2018 16:30:00 +0100 Message-ID: References: <20180619213058.12273-1-ajit.khaparde@broadcom.com> <20180619213058.12273-24-ajit.khaparde@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Jay Ding To: Ajit Khaparde , dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 687001B920 for ; Tue, 26 Jun 2018 17:30:02 +0200 (CEST) In-Reply-To: <20180619213058.12273-24-ajit.khaparde@broadcom.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/19/2018 10:30 PM, Ajit Khaparde wrote: > From: Jay Ding > > Add checking for VNIC id before sending message to firmware in > bnxt_hwrm_vnic_plcmode_cfg(). Can you please add more information, when fw_vnic_id == INVALID_HW_RING_ID, what does it mean to have fw_vnic_id == INVALID_HW_RING_ID, what is the expected result without this check? If this is fixing an issue please update commit according with proper Fixex/stable tags that patch can be backported to stable trees. > > 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 64687a69b..910129f12 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( >