]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Reset mkey index on creation
authorAya Levin <ayal@nvidia.com>
Thu, 10 Jun 2021 11:20:28 +0000 (14:20 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 16 Jun 2021 22:36:49 +0000 (15:36 -0700)
commite49c2f96a587c360cbb938ba5dd3b7e6f8275923
tree241c757b093619bf634acc99cac4deb871e44248
parent1ca4a5b046c62596d278207574bf16d4fabb7bec
net/mlx5: Reset mkey index on creation

Reset only the index part of the mkey and keep the variant part. On
devlink reload, driver recreates mkeys, so the mkey index may change.
Trying to preserve the variant part of the mkey, driver mistakenly
merged the mkey index with current value. In case of a devlink reload,
current value of index part is dirty, so the index may be corrupted.

Fixes: cc44698b31a8 ("{IB,net}/mlx5: Setup mkey variant before mr create command invocation")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Amir Tzin <amirtz@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/mr.c