[V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
Checks
Commit Message
From: Shiqi Liu <835703180@qq.com>
To Maxime,
I am so sorry too late to reply your comment.My name is Shiqi Liu.
I got stuck in how to reply the comment before.Now, it seenms to be ok!Maybe there will be some mistakes I have taken ,
when I reply,please tell me how to do it correctly!
Thanks,
Shiqi Liu
--
Comments
Hi Shiqi
From: 835703180@qq.com <835703180@qq.com>
> From: Shiqi Liu <835703180@qq.com>
>
> To Maxime,
> I am so sorry too late to reply your comment.My name is Shiqi Liu.
> I got stuck in how to reply the comment before.Now, it seenms to be
> ok!Maybe there will be some mistakes I have taken , when I reply,please tell
> me how to do it correctly!
> Thanks,
> Shiqi Liu
>
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> index 7167a98db0..6223afaae8 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> @@ -395,6 +395,7 @@ mlx5_vdpa_err_event_setup(struct mlx5_vdpa_priv
> *priv)
> rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED);
> if (priv->err_intr_handle == NULL) {
> DRV_LOG(ERR, "Fail to allocate intr_handle");
> + rte_errno = ENOMEM;
Shouldn't rte_intr_instance_alloc set it?
> goto error;
> }
> if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
> --
@@ -395,6 +395,7 @@ mlx5_vdpa_err_event_setup(struct mlx5_vdpa_priv *priv)
rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED);
if (priv->err_intr_handle == NULL) {
DRV_LOG(ERR, "Fail to allocate intr_handle");
+ rte_errno = ENOMEM;
goto error;
}
if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))