vdpa/mlx5: fix return value check of mkey create
Subsystems (2)
PATCH 1/1 vdpa/mlx5: fix return value check of mkey create
The return value of "mlx5_os_wrapped_mkey_create" is checked in the caller. A zero means success without any error.
The typo in the if-condition should be fixed in case there is a misjudgment.
--- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +1 -1
@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, (void *)(uintptr_t )log_base, log_size, &priv->lm_mr); -if (!ret) { +if (ret) {DRV_LOG (ERR ,"Failed to allocate wrapped MR for lm." );return -1 ; }
Signature · 1 line
2.27.0
Quoted 7 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Friday, November 12, 2021 10:43 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] vdpa/mlx5: fix return value check of mkey create
Quoted 7 lines
The return value of "
mlx5_os_wrapped_mkey_create" is checked in the caller. A zero means success without any error.The typo in the if-condition should be fixed in case there is a misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MR creation")
Wrong commit id, should be the one in main tree:
With this fixed:
Quoted 24 lines
Signed-off-by Bing Zhao <[email protected]>Acked-by Matan Azrad <[email protected]>--- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vdpa/mlx5/mlx5_vdpa_lm.c +1
-1@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv,uint64_t log_base, (void *)(uintptr_t)log_base, log_size, &priv->lm_mr); -if (!ret) { +if (ret) {DRV_LOG (ERR ,"Failed to allocate wrapped MR for lm." );return -1 ;}
--
2.27.0
Hi Chenbo,
Quoted 29 lines
-----Original Message-----
From: Xia, Chenbo <[email protected]>
Sent: Tuesday, November 16, 2021 3:54 PM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkey createExternal email: Use caution opening links or attachments
Quoted 8 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Friday, November 12, 2021 10:43 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] vdpa/mlx5: fix return value check of mkey createThe return value of "
mlx5_os_wrapped_mkey_create" is checked inthe
Quoted 6 lines
caller. A zero means success without any error.
The typo in the if-condition should be fixed in case there is a misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
Quoted 8 lines
Wrong commit id, should be the one in main tree:
Fixes 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
With this fixed:
Reviewed-by Chenbo Xia <[email protected]>
Thanks for the comments.
Is there any need to send a v2 or Maxime will help on this?
Quoted 17 lines
Quoted 14 lines
Signed-off-by Bing Zhao <[email protected]>Acked-by Matan Azrad <[email protected]>--- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv · line 48
Quoted 2 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, (void*)(uintptr_t)log_base,
Quoted 11 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
Quoted 6 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +1
-1log_size, &priv- lm_mr); -if (!ret) { +if (ret) { DRV_LOG(ERR, "Failed to allocate wrapped MR forlm.");
Quoted 4 lines
return -1; }--
2.27.0
BR. Bing
Quoted 46 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Tuesday, November 16, 2021 4:01 PM
To: Xia, Chenbo <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkey createHi Chenbo,
Quoted 34 lines
-----Original Message-----
From: Xia, Chenbo <[email protected]>
Sent: Tuesday, November 16, 2021 3:54 PM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkey createExternal email: Use caution opening links or attachments
Quoted 8 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Friday, November 12, 2021 10:43 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] vdpa/mlx5: fix return value check of mkey createThe return value of "
mlx5_os_wrapped_mkey_create" is checked inthe
Quoted 6 lines
caller. A zero means success without any error.
The typo in the if-condition should be fixed in case there is a misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
Wrong commit id, should be the one in main tree:
Fixes 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
Quoted 6 lines
Quoted 3 lines
With this fixed:
Reviewed-by Chenbo Xia <[email protected]>Thanks for the comments.
Is there any need to send a v2 or Maxime will help on this?
I think it can be fixed when applying.
Thanks,
Chenbo
Hi,
Quoted 63 lines
-----Original Message-----
From: Xia, Chenbo <[email protected]>
Sent: Tuesday, November 16, 2021 4:05 PM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkey createExternal email: Use caution opening links or attachments
Quoted 8 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Tuesday, November 16, 2021 4:01 PM
To: Xia, Chenbo <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkeycreate
Quoted 22 lines
Hi Chenbo,
Quoted 18 lines
-----Original Message-----
From: Xia, Chenbo <[email protected]>
Sent: Tuesday, November 16, 2021 3:54 PM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] vdpa/mlx5: fix return value check of mkey createExternal email: Use caution opening links or attachments
Quoted 6 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Friday, November 12, 2021 10:43 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] vdpa/mlx5: fix return value check of mkeycreate
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
The return value of "
mlx5_os_wrapped_mkey_create" is checkedin
Quoted 4 lines
Quoted 4 lines
the
Quoted 3 lines
caller. A zero means success without any error.
The typo in the if-condition should be fixed in case there is
a
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
Wrong commit id, should be the one in main tree:
Fixes 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
With this fixed:
Reviewed-by Chenbo Xia <[email protected]>Thanks for the comments.
Is there any need to send a v2 or Maxime will help on this?I think it can be fixed when applying.
Then that's good. Thank you.
Please let me know whenever a v2 is needed.
Quoted 3 lines
Thanks,
Chenbo
BR. Bing
Maxime Coquelin
AppliedQuoted 20 lines · Bing Zhao
The return value of "
mlx5_os_wrapped_mkey_create" is checked in the caller. A zero means success without any error.The typo in the if-condition should be fixed in case there is a misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MR creation")Signed-off-by Bing Zhao <[email protected]>Acked-by Matan Azrad <[email protected]>--- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0
drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, · line 53
Quoted 8 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +1
-1@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, (void *)(uintptr_t )log_base, log_size, &priv->lm_mr); -if (!ret) { +if (ret) {DRV_LOG (ERR ,"Failed to allocate wrapped MR for lm." );return -1 ; }
Applied to dpdk-next-virtio/main with Fixes tag fixed.
Thanks,
Maxime
Hi Maxime,
Quoted 45 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Tuesday, November 16, 2021 6:25 PM
To: Bing Zhao <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: Re: [PATCH] vdpa/mlx5: fix return value check of mkey createExternal email: Use caution opening links or attachments
Quoted 1 line · Bing Zhao
The return value of "
mlx5_os_wrapped_mkey_create" is checked inthe
Quoted 6 lines
caller. A zero means success without any error.
The typo in the if-condition should be fixed in case there is a misjudgment.
Fixes f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MRcreation")
drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv
Quoted 13 lines
Signed-off-by Bing Zhao <[email protected]>Acked-by Matan Azrad <[email protected]>--- drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv*priv,
uint64_tlog_base,drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv · line 47
Quoted 1 line
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0(void*)(uintptr_t)log_base,
drivers/vdpa/mlx5/mlx5_vdpa_lm.c mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
Quoted 6 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +1
-1log_size, &priv- lm_mr); -if (!ret) { +if (ret) { DRV_LOG(ERR, "Failed to allocate wrapped MR forlm.");
Quoted 8 lines
Quoted 3 lines
drivers/vdpa/mlx5/mlx5_vdpa_lm.c +0
-0return -1 ;}Applied to dpdk-next-virtio/main with Fixes tag fixed.
Thanks,
Maxime
Thank you.
BR. Bing