DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] vdpa/mlx5: fix return value check of mkey create
@ 2021-11-12 14:42 Bing Zhao
  2021-11-16  7:54 ` Xia, Chenbo
  2021-11-16 10:24 ` Maxime Coquelin
  0 siblings, 2 replies; 7+ messages in thread
From: Bing Zhao @ 2021-11-12 14:42 UTC (permalink / raw)
  To: viacheslavo, matan; +Cc: dev, rasland

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 <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-16 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 14:42 [PATCH] vdpa/mlx5: fix return value check of mkey create Bing Zhao
2021-11-16  7:54 ` Xia, Chenbo
2021-11-16  8:01   ` Bing Zhao
2021-11-16  8:04     ` Xia, Chenbo
2021-11-16  8:13       ` Bing Zhao
2021-11-16 10:24 ` Maxime Coquelin
2021-11-16 10:25   ` Bing Zhao

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).