[PATCH] vdpa/mlx5: fix return value check of mkey create
Xia, Chenbo
chenbo.xia at intel.com
Tue Nov 16 08:54:01 CET 2021
> -----Original Message-----
> From: Bing Zhao <bingz at nvidia.com>
> Sent: Friday, November 12, 2021 10:43 PM
> To: viacheslavo at nvidia.com; matan at nvidia.com
> Cc: dev at dpdk.org; rasland at nvidia.com
> Subject: [PATCH] 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.
>
> Fixes: f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MR creation")
Wrong commit id, should be the one in main tree:
Fixes: 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MR creation")
With this fixed:
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
>
> Signed-off-by: Bing Zhao <bingz at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
> b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
> index e65e4faa47..43a2b98255 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
> @@ -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
More information about the dev
mailing list