[PATCH v2] net/enic: check notify set return value during init

Hyong Youb Kim (hyonkim) hyonkim at cisco.com
Thu Jul 16 02:40:43 CEST 2026



> -----Original Message-----
> From: Alexey Simakov <bigalex934 at gmail.com>
> Sent: Wednesday, July 15, 2026 7:31 PM
> To: John Daley (johndale) <johndale at cisco.com>; Hyong Youb Kim (hyonkim)
> <hyonkim at cisco.com>; Neil Horman <nhorman at tuxdriver.com>; Sujith Sankar
> <ssujith at cisco.com>; David Marchand <david.marchand at redhat.com>
> Cc: dev at dpdk.org; stable at dpdk.org; Alexey Simakov <bigalex934 at gmail.com>
> Subject: [PATCH v2] 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 at dpdk.org
> 
> Signed-off-by: Alexey Simakov <bigalex934 at 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 at gmail.com/
> 
>  drivers/net/enic/enic_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
> index 2696fa77d4..f46f429135 100644
> --- a/drivers/net/enic/enic_main.c
> +++ b/drivers/net/enic/enic_main.c
> @@ -1887,7 +1887,9 @@ 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)
> +		return err;
> 

Could you add an error message, like the following? Looks like all error returns in this function log a message.

dev_err(enic, "failed to enable notify buffer\n");

Thanks.
-Hyong

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



More information about the dev mailing list