]> git.droids-corp.org - dpdk.git/commitdiff
vdpa/mlx5: fix mkey creation check
authorBing Zhao <bingz@nvidia.com>
Fri, 12 Nov 2021 14:42:45 +0000 (16:42 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 16 Nov 2021 10:21:18 +0000 (11:21 +0100)
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: 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MR creation")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
drivers/vdpa/mlx5/mlx5_vdpa_lm.c

index e65e4faa47d980bd026fbf931236ac3c34be86e4..43a2b98255eac9917518ce4df0596167310455b0 100644 (file)
@@ -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;
        }