* [PATCH] vdpa/mlx5: Directly assign memory key
@ 2023-02-02 12:57 Eli Cohen
2023-02-02 17:32 ` Michael S. Tsirkin
0 siblings, 1 reply; 4+ messages in thread
From: Eli Cohen @ 2023-02-02 12:57 UTC (permalink / raw)
To: mst, jasowang, si-wei.liu, virtualization, linux-kernel; +Cc: Eli Cohen
When creating a memory key, the key value should be assigned to the
passed pointer and not or'ed to.
This fix has is required but had no real impact so far.
Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
drivers/vdpa/mlx5/core/resources.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
index 9800f9bec225..45ad41287a31 100644
--- a/drivers/vdpa/mlx5/core/resources.c
+++ b/drivers/vdpa/mlx5/core/resources.c
@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
return err;
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;
}
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] vdpa/mlx5: Directly assign memory key
2023-02-02 12:57 [PATCH] vdpa/mlx5: Directly assign memory key Eli Cohen
@ 2023-02-02 17:32 ` Michael S. Tsirkin
0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2023-02-02 17:32 UTC (permalink / raw)
To: Eli Cohen; +Cc: linux-kernel, virtualization
On Thu, Feb 02, 2023 at 02:57:18PM +0200, Eli Cohen wrote:
> When creating a memory key, the key value should be assigned to the
> passed pointer and not or'ed to.
>
> This fix has is required but had no real impact so far.
I don't get what this sentence says. Both grammar and general meaning
elude me.
> Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
> drivers/vdpa/mlx5/core/resources.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
> index 9800f9bec225..45ad41287a31 100644
> --- a/drivers/vdpa/mlx5/core/resources.c
> +++ b/drivers/vdpa/mlx5/core/resources.c
> @@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
> return err;
>
> 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;
> }
>
> --
> 2.38.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vdpa/mlx5: Directly assign memory key
@ 2023-02-02 17:32 ` Michael S. Tsirkin
0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2023-02-02 17:32 UTC (permalink / raw)
To: Eli Cohen; +Cc: jasowang, si-wei.liu, virtualization, linux-kernel
On Thu, Feb 02, 2023 at 02:57:18PM +0200, Eli Cohen wrote:
> When creating a memory key, the key value should be assigned to the
> passed pointer and not or'ed to.
>
> This fix has is required but had no real impact so far.
I don't get what this sentence says. Both grammar and general meaning
elude me.
> Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
> drivers/vdpa/mlx5/core/resources.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
> index 9800f9bec225..45ad41287a31 100644
> --- a/drivers/vdpa/mlx5/core/resources.c
> +++ b/drivers/vdpa/mlx5/core/resources.c
> @@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
> return err;
>
> 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;
> }
>
> --
> 2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vdpa/mlx5: Directly assign memory key
2023-02-02 17:32 ` Michael S. Tsirkin
(?)
@ 2023-02-05 7:26 ` Eli Cohen
-1 siblings, 0 replies; 4+ messages in thread
From: Eli Cohen @ 2023-02-05 7:26 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: jasowang, si-wei.liu, virtualization, linux-kernel
On 02/02/2023 19:32, Michael S. Tsirkin wrote:
> On Thu, Feb 02, 2023 at 02:57:18PM +0200, Eli Cohen wrote:
>> When creating a memory key, the key value should be assigned to the
>> passed pointer and not or'ed to.
>>
>> This fix has is required but had no real impact so far.
> I don't get what this sentence says. Both grammar and general meaning
> elude me.
And I can't blame you for that.
Re-sending...
>
>> Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
>> Signed-off-by: Eli Cohen <elic@nvidia.com>
>> ---
>> drivers/vdpa/mlx5/core/resources.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
>> index 9800f9bec225..45ad41287a31 100644
>> --- a/drivers/vdpa/mlx5/core/resources.c
>> +++ b/drivers/vdpa/mlx5/core/resources.c
>> @@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
>> return err;
>>
>> 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;
>> }
>>
>> --
>> 2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-05 7:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-02 12:57 [PATCH] vdpa/mlx5: Directly assign memory key Eli Cohen
2023-02-02 17:32 ` Michael S. Tsirkin
2023-02-02 17:32 ` Michael S. Tsirkin
2023-02-05 7:26 ` Eli Cohen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.