[dpdk-dev] [PATCH 23/31] net/bnxt: check for invalid vnic id

Ferruh Yigit ferruh.yigit at intel.com
Tue Jun 26 17:30:00 CEST 2018


On 6/19/2018 10:30 PM, Ajit Khaparde wrote:
> From: Jay Ding <jay.ding at broadcom.com>
> 
> 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 <jay.ding at broadcom.com>
> Reviewed-by: Randy Schacher <stuart.schacher at broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
> ---
>  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(
> 



More information about the dev mailing list