* [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes
@ 2023-09-20 10:01 Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys Leon Romanovsky
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-09-20 10:01 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Leon Romanovsky, Edward Srouji, linux-rdma, Maor Gottlieb,
Mark Bloch, Michael Guralnik, Shay Drory
From: Leon Romanovsky <leonro@nvidia.com>
Hi,
This patchset is combination of various mlx5_ib fixes.
Thanks
Hamdan Igbaria (1):
RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor
creation
Michael Guralnik (1):
RDMA/mlx5: Fix assigning access flags to cache mkeys
Shay Drory (1):
RDMA/mlx5: Fix NULL string error
drivers/infiniband/hw/mlx5/fs.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 2 +-
drivers/infiniband/hw/mlx5/mr.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH rdma-rc 1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys
2023-09-20 10:01 [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
@ 2023-09-20 10:01 ` Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 2/3] RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation Leon Romanovsky
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-09-20 10:01 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Michael Guralnik, Edward Srouji, linux-rdma, Maor Gottlieb,
Mark Bloch, Shay Drory
From: Michael Guralnik <michaelgur@nvidia.com>
After the change to use dynamic cache structure, new cache entries
can be added and the mkey allocation can no longer assume that all
mkeys created for the cache have access_flags equal to zero.
Example of a flow that exposes the issue:
A user registers MR with RO on a HCA that cannot UMR RO and the mkey is
created outside of the cache. When the user deregisters the MR, a new
cache entry is created to store mkeys with RO.
Later, the user registers 2 MRs with RO. The first MR is reused from the
new cache entry. When we try to get the second mkey from the cache we see
the entry is empty so we go to the MR cache mkey allocation flow which
would have allocated a mkey with no access flags, resulting the user getting
a MR without RO.
Fixes: dd1b913fb0d0 ("RDMA/mlx5: Cache all user cacheable mkeys on dereg MR flow")
Reviewed-by: Edward Srouji <edwards@nvidia.com>
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/mr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 5d3cc225be29..4a1e78e394e5 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -239,7 +239,8 @@ static int get_mkc_octo_size(unsigned int access_mode, unsigned int ndescs)
static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc)
{
- set_mkc_access_pd_addr_fields(mkc, 0, 0, ent->dev->umrc.pd);
+ set_mkc_access_pd_addr_fields(mkc, ent->rb_key.access_flags, 0,
+ ent->dev->umrc.pd);
MLX5_SET(mkc, mkc, free, 1);
MLX5_SET(mkc, mkc, umr_en, 1);
MLX5_SET(mkc, mkc, access_mode_1_0, ent->rb_key.access_mode & 0x3);
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH rdma-rc 2/3] RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation
2023-09-20 10:01 [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys Leon Romanovsky
@ 2023-09-20 10:01 ` Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 3/3] RDMA/mlx5: Fix NULL string error Leon Romanovsky
2023-09-26 9:30 ` [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-09-20 10:01 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Hamdan Igbaria, Edward Srouji, linux-rdma, Maor Gottlieb,
Mark Bloch, Michael Guralnik, Shay Drory
From: Hamdan Igbaria <hamdani@nvidia.com>
The mutex was not unlocked on some of the error flows.
Moved the unlock location to include all the error flow scenarios.
Fixes: e1f4a52ac171 ("RDMA/mlx5: Create an indirect flow table for steering anchor")
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 1e419e080b53..520034acf73a 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -2470,8 +2470,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_STEERING_ANCHOR_CREATE)(
mlx5_steering_anchor_destroy_res(ft_prio);
put_flow_table:
put_flow_table(dev, ft_prio, true);
- mutex_unlock(&dev->flow_db->lock);
free_obj:
+ mutex_unlock(&dev->flow_db->lock);
kfree(obj);
return err;
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH rdma-rc 3/3] RDMA/mlx5: Fix NULL string error
2023-09-20 10:01 [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 2/3] RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation Leon Romanovsky
@ 2023-09-20 10:01 ` Leon Romanovsky
2023-09-26 9:30 ` [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-09-20 10:01 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Shay Drory, Edward Srouji, linux-rdma, Maor Gottlieb, Mark Bloch,
Michael Guralnik
From: Shay Drory <shayd@nvidia.com>
checkpath is complaining about NULL string, change it to 'Unknown'.
Fixes: 37aa5c36aa70 ("IB/mlx5: Add UARs write-combining and non-cached mapping")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index aed5cdea50e6..555629b798b9 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -2084,7 +2084,7 @@ static inline char *mmap_cmd2str(enum mlx5_ib_mmap_cmd cmd)
case MLX5_IB_MMAP_DEVICE_MEM:
return "Device Memory";
default:
- return NULL;
+ return "Unknown";
}
}
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes
2023-09-20 10:01 [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
` (2 preceding siblings ...)
2023-09-20 10:01 ` [PATCH rdma-rc 3/3] RDMA/mlx5: Fix NULL string error Leon Romanovsky
@ 2023-09-26 9:30 ` Leon Romanovsky
3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-09-26 9:30 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: Edward Srouji, linux-rdma, Maor Gottlieb, Mark Bloch,
Michael Guralnik, Shay Drory, Leon Romanovsky
On Wed, 20 Sep 2023 13:01:53 +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Hi,
>
> This patchset is combination of various mlx5_ib fixes.
>
> Thanks
>
> [...]
Applied, thanks!
[1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys
https://git.kernel.org/rdma/rdma/c/4f14c6c0213e1d
[2/3] RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation
https://git.kernel.org/rdma/rdma/c/2fad8f06a582cd
[3/3] RDMA/mlx5: Fix NULL string error
https://git.kernel.org/rdma/rdma/c/dab994bcc609a1
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes
@ 2025-06-16 9:14 Leon Romanovsky
2025-06-25 7:45 ` Leon Romanovsky
0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2025-06-16 9:14 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: linux-rdma, Maher Sanalla, Mark Bloch, Michael Guralnik,
Parav Pandit, Patrisious Haddad
The batch of different mlx5_ib fixes from Patrisious.
Patrisious Haddad (3):
RDMA/mlx5: Fix HW counters query for non-representor devices
RDMA/mlx5: Fix CC counters query for MPV
RDMA/mlx5: Fix vport loopback for MPV device
drivers/infiniband/hw/mlx5/counters.c | 4 ++--
drivers/infiniband/hw/mlx5/main.c | 33 +++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 2 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes
2025-06-16 9:14 Leon Romanovsky
@ 2025-06-25 7:45 ` Leon Romanovsky
0 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2025-06-25 7:45 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: linux-rdma, Maher Sanalla, Mark Bloch, Michael Guralnik,
Parav Pandit, Patrisious Haddad
On Mon, 16 Jun 2025 12:14:51 +0300, Leon Romanovsky wrote:
> The batch of different mlx5_ib fixes from Patrisious.
>
> Patrisious Haddad (3):
> RDMA/mlx5: Fix HW counters query for non-representor devices
> RDMA/mlx5: Fix CC counters query for MPV
> RDMA/mlx5: Fix vport loopback for MPV device
>
> [...]
Applied, thanks!
[1/3] RDMA/mlx5: Fix HW counters query for non-representor devices
https://git.kernel.org/rdma/rdma/c/3cc1dbfddf88dc
[2/3] RDMA/mlx5: Fix CC counters query for MPV
https://git.kernel.org/rdma/rdma/c/acd245b1e33fc4
[3/3] RDMA/mlx5: Fix vport loopback for MPV device
https://git.kernel.org/rdma/rdma/c/a9a9e68954f29b
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-25 7:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 10:01 [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Fix assigning access flags to cache mkeys Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 2/3] RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation Leon Romanovsky
2023-09-20 10:01 ` [PATCH rdma-rc 3/3] RDMA/mlx5: Fix NULL string error Leon Romanovsky
2023-09-26 9:30 ` [PATCH rdma-rc 0/3] Batch of mlx5_ib fixes Leon Romanovsky
-- strict thread matches above, loose matches on Subject: below --
2025-06-16 9:14 Leon Romanovsky
2025-06-25 7:45 ` Leon Romanovsky
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.