* [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
@ 2022-06-12 14:09 835703180
2022-06-14 9:43 ` Maxime Coquelin
0 siblings, 1 reply; 10+ messages in thread
From: 835703180 @ 2022-06-12 14:09 UTC (permalink / raw)
To: viacheslavo; +Cc: dev, newsky647
From: newsky647 <835703180@qq.com>
After function rte_intr_instance_alloc failed, we should return ENOMEM
for error code.
Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
Signed-off-by: newsky647 <835703180@qq.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
1 file changed, 1 insertion(+)
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;
goto error;
}
if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
--
2.35.1.windows.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-12 14:09 [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed 835703180
@ 2022-06-14 9:43 ` Maxime Coquelin
2022-06-14 13:36 ` [PATCH V2] " 835703180
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Maxime Coquelin @ 2022-06-14 9:43 UTC (permalink / raw)
To: dev
Hi newsky647,
On 6/12/22 16:09, 835703180@qq.com wrote:
> From: newsky647 <835703180@qq.com>
>
> After function rte_intr_instance_alloc failed, we should return ENOMEM
> for error code.
>
> Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
>
> Signed-off-by: newsky647 <835703180@qq.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> goto error;
> }
> if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
The patch looks good to me, but I would need your real name for the
sign-off.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-14 9:43 ` Maxime Coquelin
@ 2022-06-14 13:36 ` 835703180
2022-06-14 13:50 ` Maxime Coquelin
2022-06-14 13:48 ` 835703180
2022-06-22 8:03 ` [PATCH] " Matan Azrad
2 siblings, 1 reply; 10+ messages in thread
From: 835703180 @ 2022-06-14 13:36 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin, Shiqi Liu
From: Shiqi Liu <835703180@qq.com>
After function rte_intr_instance_alloc failed, we should return ENOMEM
for error code.
Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
Signed-off-by: Shiqi Liu <835703180@qq.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
1 file changed, 1 insertion(+)
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;
goto error;
}
if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-14 13:36 ` [PATCH V2] " 835703180
@ 2022-06-14 13:50 ` Maxime Coquelin
0 siblings, 0 replies; 10+ messages in thread
From: Maxime Coquelin @ 2022-06-14 13:50 UTC (permalink / raw)
To: 835703180, dev
On 6/14/22 15:36, 835703180@qq.com wrote:
> From: Shiqi Liu <835703180@qq.com>
>
> After function rte_intr_instance_alloc failed, we should return ENOMEM
> for error code.
>
> Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
>
> Signed-off-by: Shiqi Liu <835703180@qq.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> goto error;
> }
> if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-14 9:43 ` Maxime Coquelin
2022-06-14 13:36 ` [PATCH V2] " 835703180
@ 2022-06-14 13:48 ` 835703180
2022-06-15 7:47 ` Matan Azrad
2022-06-22 8:03 ` [PATCH] " Matan Azrad
2 siblings, 1 reply; 10+ messages in thread
From: 835703180 @ 2022-06-14 13:48 UTC (permalink / raw)
To: dev; +Cc: maxime.coquelin, Shiqi Liu
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;
goto error;
}
if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-14 13:48 ` 835703180
@ 2022-06-15 7:47 ` Matan Azrad
0 siblings, 0 replies; 10+ messages in thread
From: Matan Azrad @ 2022-06-15 7:47 UTC (permalink / raw)
To: 835703180, dev; +Cc: maxime.coquelin
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))
> --
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-14 9:43 ` Maxime Coquelin
2022-06-14 13:36 ` [PATCH V2] " 835703180
2022-06-14 13:48 ` 835703180
@ 2022-06-22 8:03 ` Matan Azrad
2022-06-22 8:11 ` Maxime Coquelin
2 siblings, 1 reply; 10+ messages in thread
From: Matan Azrad @ 2022-06-22 8:03 UTC (permalink / raw)
To: Maxime Coquelin, dev; +Cc: 835703180, NBU-Contact-Thomas Monjalon (EXTERNAL)
Hi
I put here again the comment the putted on another version of this commit.
I saw it is already integrated but still not in master.
But please look.
From: Maxime Coquelin
> Hi newsky647,
>
> On 6/12/22 16:09, 835703180@qq.com wrote:
> > From: newsky647 <835703180@qq.com>
> >
> > After function rte_intr_instance_alloc failed, we should return ENOMEM
> > for error code.
> >
> > Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
> >
> > Signed-off-by: newsky647 <835703180@qq.com>
> > ---
> > drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > 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))
>
> The patch looks good to me, but I would need your real name for the sign-off.
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Thanks,
> Maxime
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-22 8:03 ` [PATCH] " Matan Azrad
@ 2022-06-22 8:11 ` Maxime Coquelin
2022-06-22 8:46 ` Thomas Monjalon
0 siblings, 1 reply; 10+ messages in thread
From: Maxime Coquelin @ 2022-06-22 8:11 UTC (permalink / raw)
To: Matan Azrad, dev; +Cc: 835703180, NBU-Contact-Thomas Monjalon (EXTERNAL)
Hi Matan,
On 6/22/22 10:03, Matan Azrad wrote:
> Hi
>
> I put here again the comment the putted on another version of this commit.
>
> I saw it is already integrated but still not in master.
>
> But please look.
Thanks for the heads-up, I missed your initial comment.
> From: Maxime Coquelin
>> Hi newsky647,
>>
>> On 6/12/22 16:09, 835703180@qq.com wrote:
>>> From: newsky647 <835703180@qq.com>
>>>
>>> After function rte_intr_instance_alloc failed, we should return ENOMEM
>>> for error code.
>>>
>>> Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration")
>>>
>>> Signed-off-by: newsky647 <835703180@qq.com>
>>> ---
>>> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> 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?
I think it makes sense, Thomas could you drop the patch while pulling my
branch? Or do you prefer I remove it directly from my tree?
Shiqi, can you send a new version of the patch taking Matan comment into
account?
Thanks,
Maxime
>>> goto error;
>>> }
>>> if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd))
>>
>> The patch looks good to me, but I would need your real name for the sign-off.
>>
>> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>>
>> Thanks,
>> Maxime
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-22 8:11 ` Maxime Coquelin
@ 2022-06-22 8:46 ` Thomas Monjalon
2022-06-22 8:46 ` Maxime Coquelin
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2022-06-22 8:46 UTC (permalink / raw)
To: Matan Azrad, Maxime Coquelin; +Cc: dev, 835703180
22/06/2022 10:11, Maxime Coquelin:
> >>> --- 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?
>
> I think it makes sense, Thomas could you drop the patch while pulling my
> branch? Or do you prefer I remove it directly from my tree?
I'll drop it, no problem.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed
2022-06-22 8:46 ` Thomas Monjalon
@ 2022-06-22 8:46 ` Maxime Coquelin
0 siblings, 0 replies; 10+ messages in thread
From: Maxime Coquelin @ 2022-06-22 8:46 UTC (permalink / raw)
To: Thomas Monjalon, Matan Azrad; +Cc: dev, 835703180
On 6/22/22 10:46, Thomas Monjalon wrote:
> 22/06/2022 10:11, Maxime Coquelin:
>>>>> --- 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?
>>
>> I think it makes sense, Thomas could you drop the patch while pulling my
>> branch? Or do you prefer I remove it directly from my tree?
>
> I'll drop it, no problem.
>
>
>
Thanks, I'll update its patchwork status to change requested
Maxime
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-06-22 8:47 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12 14:09 [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed 835703180
2022-06-14 9:43 ` Maxime Coquelin
2022-06-14 13:36 ` [PATCH V2] " 835703180
2022-06-14 13:50 ` Maxime Coquelin
2022-06-14 13:48 ` 835703180
2022-06-15 7:47 ` Matan Azrad
2022-06-22 8:03 ` [PATCH] " Matan Azrad
2022-06-22 8:11 ` Maxime Coquelin
2022-06-22 8:46 ` Thomas Monjalon
2022-06-22 8:46 ` Maxime Coquelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).