DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH v3] net/enic: check notify set return value during init
From: Hyong Youb Kim (hyonkim) @ 2026-07-20 22:56 UTC (permalink / raw)
  To: Alexey Simakov
  Cc: david.marchand@redhat.com, dev@dpdk.org, John Daley (johndale),
	ssujith@cisco.com, stable@dpdk.org
In-Reply-To: <20260720093338.92744-2-bigalex934@gmail.com>



> -----Original Message-----
> From: Alexey Simakov <bigalex934@gmail.com>
> Sent: Monday, July 20, 2026 6:34 PM
> To: Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>
> Cc: david.marchand@redhat.com; dev@dpdk.org; John Daley (johndale)
> <johndale@cisco.com>; ssujith@cisco.com; stable@dpdk.org; Alexey Simakov
> <bigalex934@gmail.com>
> Subject: [PATCH v3] net/enic: check notify set return value during init
> 
> The return value of vnic_dev_notify_set() is silently ignored in
> enic_dev_init(), so a memory allocation failure or hardware command
> error goes unnoticed and the driver continues with uninitialized
> notification state.
> 
> Check the return value and propagate the error to abort probe when
> notification setup fails.
> 
> Fixes: fefed3d1e62c ("enic: new driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
> ---
> 
> v3 changes: add log message
> 
> v2 link: https://patches.dpdk.org/project/dpdk/patch/20260715103105.39417-
> 1-bigalex934@gmail.com/
> v2 changes: validate return code of vnic_dev_notify_set() in driver init section
> 
> v1 link: https://patches.dpdk.org/project/dpdk/patch/20260707112014.82821-
> 1-bigalex934@gmail.com/
> 
>  drivers/net/enic/enic_main.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
> index 2696fa77d4..2a1a65d8da 100644
> --- a/drivers/net/enic/enic_main.c
> +++ b/drivers/net/enic/enic_main.c
> @@ -1887,7 +1887,11 @@ static int enic_dev_init(struct enic *enic)
>  	LIST_INIT(&enic->flows);
> 
>  	/* set up link status checking */
> -	vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
> +	err = vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
> +	if (err) {
> +		dev_err(enic, "failed to enable notify buffer\n");
> +		return err;
> +	}
> 

Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Thanks.
-Hyong

>  	enic->overlay_offload = false;
>  	/*
> --
> 2.53.0


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox