Commit 446062e6 authored by Eli Cohen's avatar Eli Cohen Committed by Michael S. Tsirkin

vdpa/mlx5: Directly assign memory key

When creating a memory key, the key value should be assigned to the
passed pointer and not or'ed to.

No functional issue was observed due to this bug.

Fixes: 29064bfd ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
Message-Id: <20230205072906.1108194-1-elic@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 0d0ed400
...@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in, ...@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
return err; return err;
mkey_index = MLX5_GET(create_mkey_out, lout, mkey_index); mkey_index = MLX5_GET(create_mkey_out, lout, mkey_index);
*mkey |= mlx5_idx_to_mkey(mkey_index); *mkey = mlx5_idx_to_mkey(mkey_index);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment