mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB
@ 2026-01-04 13:51 Leon Romanovsky
  2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel, Parav Pandit, Maher Sanalla

A collection of independent, self-contained cleanup patches in IB.

Thanks

---
Leon Romanovsky (4):
      RDMA/umem: Remove redundant DMABUF ops check
      RDMA/mlx5: Avoid direct access to DMA device pointer
      RDMA/qedr: Remove unused defines
      RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition

Maher Sanalla (1):
      RDMA/mlx5: Fix ucaps init error flow

Parav Pandit (1):
      RDMA/core: Avoid exporting module local functions and remove not-used ones

 drivers/infiniband/core/device.c      | 30 ------------------------------
 drivers/infiniband/core/umem_dmabuf.c |  3 ---
 drivers/infiniband/hw/mlx5/main.c     |  6 +++++-
 drivers/infiniband/hw/mlx5/mr.c       | 11 ++++++-----
 drivers/infiniband/hw/ocrdma/ocrdma.h |  2 --
 drivers/infiniband/hw/qedr/qedr.h     | 20 --------------------
 include/rdma/ib_verbs.h               |  2 --
 7 files changed, 11 insertions(+), 63 deletions(-)
---
base-commit: a3572bdc3a028ca47f77d7166ac95b719cf77d50
change-id: 20251224-ib-core-misc-0081798ba040

Best regards,
--  
Leon Romanovsky <leonro@nvidia.com>


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

* [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:29   ` Kalesh Anakkur Purayil
  2026-01-04 13:51 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Leon Romanovsky
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel

From: Leon Romanovsky <leonro@nvidia.com>

ib_umem_dmabuf_get_with_dma_device() is an in-kernel function and does
not require a defensive check for the .move_notify callback. All current
callers guarantee that this callback is always present.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/core/umem_dmabuf.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
index 0ec2e4120cc9..939da49b0dcc 100644
--- a/drivers/infiniband/core/umem_dmabuf.c
+++ b/drivers/infiniband/core/umem_dmabuf.c
@@ -129,9 +129,6 @@ ib_umem_dmabuf_get_with_dma_device(struct ib_device *device,
 	if (check_add_overflow(offset, (unsigned long)size, &end))
 		return ret;
 
-	if (unlikely(!ops || !ops->move_notify))
-		return ret;
-
 	dmabuf = dma_buf_get(fd);
 	if (IS_ERR(dmabuf))
 		return ERR_CAST(dmabuf);

-- 
2.52.0


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

* [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
  2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:45   ` Kalesh Anakkur Purayil
  2026-01-05  5:01   ` Zhu Yanjun
  2026-01-04 13:51 ` [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow Leon Romanovsky
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel, Parav Pandit

From: Parav Pandit <parav@nvidia.com>

Some of the functions are local to the module and some are not used
starting from commit 36783dec8d79 ("RDMA/rxe: Delete deprecated module
parameters interface"). Delete and avoid exporting them.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/core/device.c | 30 ------------------------------
 include/rdma/ib_verbs.h          |  2 --
 2 files changed, 32 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 13e8a1714bbd..0b0efa9d93aa 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -361,34 +361,6 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
 	return NULL;
 }
 
-/**
- * ib_device_get_by_name - Find an IB device by name
- * @name: The name to look for
- * @driver_id: The driver ID that must match (RDMA_DRIVER_UNKNOWN matches all)
- *
- * Find and hold an ib_device by its name. The caller must call
- * ib_device_put() on the returned pointer.
- */
-struct ib_device *ib_device_get_by_name(const char *name,
-					enum rdma_driver_id driver_id)
-{
-	struct ib_device *device;
-
-	down_read(&devices_rwsem);
-	device = __ib_device_get_by_name(name);
-	if (device && driver_id != RDMA_DRIVER_UNKNOWN &&
-	    device->ops.driver_id != driver_id)
-		device = NULL;
-
-	if (device) {
-		if (!ib_device_try_get(device))
-			device = NULL;
-	}
-	up_read(&devices_rwsem);
-	return device;
-}
-EXPORT_SYMBOL(ib_device_get_by_name);
-
 static int rename_compat_devs(struct ib_device *device)
 {
 	struct ib_core_device *cdev;
@@ -2875,7 +2847,6 @@ int ib_add_sub_device(struct ib_device *parent,
 
 	return ret;
 }
-EXPORT_SYMBOL(ib_add_sub_device);
 
 int ib_del_sub_device_and_put(struct ib_device *sub)
 {
@@ -2894,7 +2865,6 @@ int ib_del_sub_device_and_put(struct ib_device *sub)
 
 	return 0;
 }
-EXPORT_SYMBOL(ib_del_sub_device_and_put);
 
 #ifdef CONFIG_INFINIBAND_VIRT_DMA
 int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents)
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 6aad66bc5dd7..e92bf2e44fd8 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4545,8 +4545,6 @@ static inline bool ib_device_try_get(struct ib_device *dev)
 void ib_device_put(struct ib_device *device);
 struct ib_device *ib_device_get_by_netdev(struct net_device *ndev,
 					  enum rdma_driver_id driver_id);
-struct ib_device *ib_device_get_by_name(const char *name,
-					enum rdma_driver_id driver_id);
 struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u32 port,
 					    u16 pkey, const union ib_gid *gid,
 					    const struct sockaddr *addr);

-- 
2.52.0


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

* [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
  2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
  2026-01-04 13:51 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:37   ` Kalesh Anakkur Purayil
  2026-01-04 13:51 ` [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer Leon Romanovsky
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel, Maher Sanalla

From: Maher Sanalla <msanalla@nvidia.com>

In mlx5_ib_stage_caps_init(), if mlx5_ib_init_ucaps() fails after
mlx5_ib_init_var_table() succeeds, the VAR bitmap is leaked since
the function returns without cleanup.

Thus, cleanup the var table bitmap in case of error of initializing
ucaps before exiting, preventing the leak above.

Fixes: cf7174e8982f ("RDMA/mlx5: Create UCAP char devices for supported device capabilities")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/mlx5/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 40284bbb45d6..8d515d266125 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4466,12 +4466,16 @@ static int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev)
 	    MLX5_HCA_CAP_2_GENERAL_OBJECT_TYPES_RDMA_CTRL) {
 		err = mlx5_ib_init_ucaps(dev);
 		if (err)
-			return err;
+			goto err_ucaps;
 	}
 
 	dev->ib_dev.use_cq_dim = true;
 
 	return 0;
+
+err_ucaps:
+	bitmap_free(dev->var_table.bitmap);
+	return err;
 }
 
 static const struct ib_device_ops mlx5_ib_dev_port_ops = {

-- 
2.52.0


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

* [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
                   ` (2 preceding siblings ...)
  2026-01-04 13:51 ` [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:45   ` Kalesh Anakkur Purayil
  2026-01-04 13:51 ` [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines Leon Romanovsky
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel

From: Leon Romanovsky <leonro@nvidia.com>

The dma_device field is marked as internal and must not be accessed by
drivers or ULPs. Remove all direct mlx5 references to this field.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/mlx5/mr.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 325fa04cbe8a..a7b37e3df072 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -1646,10 +1646,13 @@ reg_user_mr_dmabuf(struct ib_pd *pd, struct device *dma_device,
 						 offset, length, fd,
 						 access_flags,
 						 &mlx5_ib_dmabuf_attach_ops);
-	else
+	else if (dma_device)
 		umem_dmabuf = ib_umem_dmabuf_get_pinned_with_dma_device(&dev->ib_dev,
 				dma_device, offset, length,
 				fd, access_flags);
+	else
+		umem_dmabuf = ib_umem_dmabuf_get_pinned(
+			&dev->ib_dev, offset, length, fd, access_flags);
 
 	if (IS_ERR(umem_dmabuf)) {
 		mlx5_ib_dbg(dev, "umem_dmabuf get failed (%pe)\n", umem_dmabuf);
@@ -1782,10 +1785,8 @@ struct ib_mr *mlx5_ib_reg_user_mr_dmabuf(struct ib_pd *pd, u64 offset,
 		return reg_user_mr_dmabuf_by_data_direct(pd, offset, length, virt_addr,
 							 fd, access_flags);
 
-	return reg_user_mr_dmabuf(pd, pd->device->dma_device,
-				  offset, length, virt_addr,
-				  fd, access_flags, MLX5_MKC_ACCESS_MODE_MTT,
-				  dmah);
+	return reg_user_mr_dmabuf(pd, NULL, offset, length, virt_addr, fd,
+				  access_flags, MLX5_MKC_ACCESS_MODE_MTT, dmah);
 }
 
 /*

-- 
2.52.0


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

* [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
                   ` (3 preceding siblings ...)
  2026-01-04 13:51 ` [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:34   ` Kalesh Anakkur Purayil
  2026-01-04 13:51 ` [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition Leon Romanovsky
  2026-01-05  9:07 ` [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
  6 siblings, 1 reply; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel

From: Leon Romanovsky <leonro@nvidia.com>

Perform basic cleanup by removing unused defines from qedr.h.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/qedr/qedr.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h
index db9ef3e1eb97..a6c9a4d9ab93 100644
--- a/drivers/infiniband/hw/qedr/qedr.h
+++ b/drivers/infiniband/hw/qedr/qedr.h
@@ -53,11 +53,8 @@
 		 DP_NAME(dev) ? DP_NAME(dev) : "", ## __VA_ARGS__)
 
 #define QEDR_MSG_INIT "INIT"
-#define QEDR_MSG_MISC "MISC"
 #define QEDR_MSG_CQ   "  CQ"
 #define QEDR_MSG_MR   "  MR"
-#define QEDR_MSG_RQ   "  RQ"
-#define QEDR_MSG_SQ   "  SQ"
 #define QEDR_MSG_QP   "  QP"
 #define QEDR_MSG_SRQ  " SRQ"
 #define QEDR_MSG_GSI  " GSI"
@@ -65,7 +62,6 @@
 
 #define QEDR_CQ_MAGIC_NUMBER	(0x11223344)
 
-#define FW_PAGE_SIZE		(RDMA_RING_PAGE_SIZE)
 #define FW_PAGE_SHIFT		(12)
 
 struct qedr_dev;
@@ -178,24 +174,18 @@ struct qedr_dev {
 	u8 user_dpm_enabled;
 };
 
-#define QEDR_MAX_SQ_PBL			(0x8000)
 #define QEDR_MAX_SQ_PBL_ENTRIES		(0x10000 / sizeof(void *))
 #define QEDR_SQE_ELEMENT_SIZE		(sizeof(struct rdma_sq_sge))
 #define QEDR_MAX_SQE_ELEMENTS_PER_SQE	(ROCE_REQ_MAX_SINGLE_SQ_WQE_SIZE / \
 					 QEDR_SQE_ELEMENT_SIZE)
-#define QEDR_MAX_SQE_ELEMENTS_PER_PAGE	((RDMA_RING_PAGE_SIZE) / \
-					 QEDR_SQE_ELEMENT_SIZE)
 #define QEDR_MAX_SQE			((QEDR_MAX_SQ_PBL_ENTRIES) *\
 					 (RDMA_RING_PAGE_SIZE) / \
 					 (QEDR_SQE_ELEMENT_SIZE) /\
 					 (QEDR_MAX_SQE_ELEMENTS_PER_SQE))
 /* RQ */
-#define QEDR_MAX_RQ_PBL			(0x2000)
 #define QEDR_MAX_RQ_PBL_ENTRIES		(0x10000 / sizeof(void *))
 #define QEDR_RQE_ELEMENT_SIZE		(sizeof(struct rdma_rq_sge))
 #define QEDR_MAX_RQE_ELEMENTS_PER_RQE	(RDMA_MAX_SGE_PER_RQ_WQE)
-#define QEDR_MAX_RQE_ELEMENTS_PER_PAGE	((RDMA_RING_PAGE_SIZE) / \
-					 QEDR_RQE_ELEMENT_SIZE)
 #define QEDR_MAX_RQE			((QEDR_MAX_RQ_PBL_ENTRIES) *\
 					 (RDMA_RING_PAGE_SIZE) / \
 					 (QEDR_RQE_ELEMENT_SIZE) /\
@@ -210,12 +200,8 @@ struct qedr_dev {
 
 #define QEDR_ROCE_MAX_CNQ_SIZE		(0x4000)
 
-#define QEDR_MAX_PORT			(1)
 #define QEDR_PORT			(1)
 
-#define QEDR_UVERBS(CMD_NAME) (1ull << IB_USER_VERBS_CMD_##CMD_NAME)
-
-#define QEDR_ROCE_PKEY_MAX 1
 #define QEDR_ROCE_PKEY_TABLE_LEN 1
 #define QEDR_ROCE_PKEY_DEFAULT 0xffff
 
@@ -336,12 +322,6 @@ struct qedr_qp_hwq_info {
 	union db_prod32 iwarp_db2_data;
 };
 
-#define QEDR_INC_SW_IDX(p_info, index)					\
-	do {								\
-		p_info->index = (p_info->index + 1) &			\
-				qed_chain_get_capacity(p_info->pbl)	\
-	} while (0)
-
 struct qedr_srq_hwq_info {
 	u32 max_sges;
 	u32 max_wr;

-- 
2.52.0


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

* [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
                   ` (4 preceding siblings ...)
  2026-01-04 13:51 ` [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines Leon Romanovsky
@ 2026-01-04 13:51 ` Leon Romanovsky
  2026-01-05  3:41   ` Kalesh Anakkur Purayil
  2026-01-05  9:07 ` [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
  6 siblings, 1 reply; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-04 13:51 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel

From: Leon Romanovsky <leonro@nvidia.com>

The OCRDMA_UVERBS() macro is unused, so remove it to clean up the code.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/ocrdma/ocrdma.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h
index 5eb61c110090..5584b781e2e8 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma.h
+++ b/drivers/infiniband/hw/ocrdma/ocrdma.h
@@ -67,8 +67,6 @@
 #define OC_SKH_DEVICE_VF 0x728
 #define OCRDMA_MAX_AH 512
 
-#define OCRDMA_UVERBS(CMD_NAME) (1ull << IB_USER_VERBS_CMD_##CMD_NAME)
-
 #define convert_to_64bit(lo, hi) ((u64)hi << 32 | (u64)lo)
 #define EQ_INTR_PER_SEC_THRSH_HI 150000
 #define EQ_INTR_PER_SEC_THRSH_LOW 100000

-- 
2.52.0


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

* Re: [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check
  2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
@ 2026-01-05  3:29   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:29 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

On Sun, Jan 4, 2026 at 7:22 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> ib_umem_dmabuf_get_with_dma_device() is an in-kernel function and does
> not require a defensive check for the .move_notify callback. All current
> callers guarantee that this callback is always present.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines
  2026-01-04 13:51 ` [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines Leon Romanovsky
@ 2026-01-05  3:34   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:34 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

On Sun, Jan 4, 2026 at 7:22 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Perform basic cleanup by removing unused defines from qedr.h.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow
  2026-01-04 13:51 ` [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow Leon Romanovsky
@ 2026-01-05  3:37   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:37 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel, Maher Sanalla

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Sun, Jan 4, 2026 at 7:22 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Maher Sanalla <msanalla@nvidia.com>
>
> In mlx5_ib_stage_caps_init(), if mlx5_ib_init_ucaps() fails after
> mlx5_ib_init_var_table() succeeds, the VAR bitmap is leaked since
> the function returns without cleanup.
>
> Thus, cleanup the var table bitmap in case of error of initializing
> ucaps before exiting, preventing the leak above.
>
> Fixes: cf7174e8982f ("RDMA/mlx5: Create UCAP char devices for supported device capabilities")
> Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
> Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition
  2026-01-04 13:51 ` [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition Leon Romanovsky
@ 2026-01-05  3:41   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:41 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Sun, Jan 4, 2026 at 7:23 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The OCRDMA_UVERBS() macro is unused, so remove it to clean up the code.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer
  2026-01-04 13:51 ` [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer Leon Romanovsky
@ 2026-01-05  3:45   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:45 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

On Sun, Jan 4, 2026 at 7:23 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The dma_device field is marked as internal and must not be accessed by
> drivers or ULPs. Remove all direct mlx5 references to this field.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones
  2026-01-04 13:51 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Leon Romanovsky
@ 2026-01-05  3:45   ` Kalesh Anakkur Purayil
  2026-01-05  5:01   ` Zhu Yanjun
  1 sibling, 0 replies; 15+ messages in thread
From: Kalesh Anakkur Purayil @ 2026-01-05  3:45 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, linux-rdma, linux-kernel, Parav Pandit

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Sun, Jan 4, 2026 at 7:22 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Parav Pandit <parav@nvidia.com>
>
> Some of the functions are local to the module and some are not used
> starting from commit 36783dec8d79 ("RDMA/rxe: Delete deprecated module
> parameters interface"). Delete and avoid exporting them.
>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>


-- 
Regards,
Kalesh AP

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5509 bytes --]

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

* Re: [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones
  2026-01-04 13:51 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Leon Romanovsky
  2026-01-05  3:45   ` Kalesh Anakkur Purayil
@ 2026-01-05  5:01   ` Zhu Yanjun
  1 sibling, 0 replies; 15+ messages in thread
From: Zhu Yanjun @ 2026-01-05  5:01 UTC (permalink / raw)
  To: Leon Romanovsky, Jason Gunthorpe, Yishai Hadas, Chiara Meiohas,
	Michal Kalderon, Selvin Xavier
  Cc: linux-rdma, linux-kernel, Parav Pandit

在 2026/1/4 5:51, Leon Romanovsky 写道:
> From: Parav Pandit <parav@nvidia.com>
> 
> Some of the functions are local to the module and some are not used
> starting from commit 36783dec8d79 ("RDMA/rxe: Delete deprecated module
> parameters interface"). Delete and avoid exporting them.
> 
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>

Zhu Yanjun

> ---
>   drivers/infiniband/core/device.c | 30 ------------------------------
>   include/rdma/ib_verbs.h          |  2 --
>   2 files changed, 32 deletions(-)
> 
> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index 13e8a1714bbd..0b0efa9d93aa 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -361,34 +361,6 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
>   	return NULL;
>   }
>   
> -/**
> - * ib_device_get_by_name - Find an IB device by name
> - * @name: The name to look for
> - * @driver_id: The driver ID that must match (RDMA_DRIVER_UNKNOWN matches all)
> - *
> - * Find and hold an ib_device by its name. The caller must call
> - * ib_device_put() on the returned pointer.
> - */
> -struct ib_device *ib_device_get_by_name(const char *name,
> -					enum rdma_driver_id driver_id)
> -{
> -	struct ib_device *device;
> -
> -	down_read(&devices_rwsem);
> -	device = __ib_device_get_by_name(name);
> -	if (device && driver_id != RDMA_DRIVER_UNKNOWN &&
> -	    device->ops.driver_id != driver_id)
> -		device = NULL;
> -
> -	if (device) {
> -		if (!ib_device_try_get(device))
> -			device = NULL;
> -	}
> -	up_read(&devices_rwsem);
> -	return device;
> -}
> -EXPORT_SYMBOL(ib_device_get_by_name);
> -
>   static int rename_compat_devs(struct ib_device *device)
>   {
>   	struct ib_core_device *cdev;
> @@ -2875,7 +2847,6 @@ int ib_add_sub_device(struct ib_device *parent,
>   
>   	return ret;
>   }
> -EXPORT_SYMBOL(ib_add_sub_device);
>   
>   int ib_del_sub_device_and_put(struct ib_device *sub)
>   {
> @@ -2894,7 +2865,6 @@ int ib_del_sub_device_and_put(struct ib_device *sub)
>   
>   	return 0;
>   }
> -EXPORT_SYMBOL(ib_del_sub_device_and_put);
>   
>   #ifdef CONFIG_INFINIBAND_VIRT_DMA
>   int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents)
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 6aad66bc5dd7..e92bf2e44fd8 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -4545,8 +4545,6 @@ static inline bool ib_device_try_get(struct ib_device *dev)
>   void ib_device_put(struct ib_device *device);
>   struct ib_device *ib_device_get_by_netdev(struct net_device *ndev,
>   					  enum rdma_driver_id driver_id);
> -struct ib_device *ib_device_get_by_name(const char *name,
> -					enum rdma_driver_id driver_id);
>   struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u32 port,
>   					    u16 pkey, const union ib_gid *gid,
>   					    const struct sockaddr *addr);
> 


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

* Re: [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB
  2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
                   ` (5 preceding siblings ...)
  2026-01-04 13:51 ` [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition Leon Romanovsky
@ 2026-01-05  9:07 ` Leon Romanovsky
  6 siblings, 0 replies; 15+ messages in thread
From: Leon Romanovsky @ 2026-01-05  9:07 UTC (permalink / raw)
  To: Jason Gunthorpe, Yishai Hadas, Chiara Meiohas, Michal Kalderon,
	Selvin Xavier, Leon Romanovsky
  Cc: linux-rdma, linux-kernel, Parav Pandit, Maher Sanalla


On Sun, 04 Jan 2026 15:51:32 +0200, Leon Romanovsky wrote:
> A collection of independent, self-contained cleanup patches in IB.
> 
> Thanks
> 

Applied, thanks!

[1/6] RDMA/umem: Remove redundant DMABUF ops check
      https://git.kernel.org/rdma/rdma/c/ac7dea328ab52a
[2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones
      https://git.kernel.org/rdma/rdma/c/8d466b155f8389
[3/6] RDMA/mlx5: Fix ucaps init error flow
      https://git.kernel.org/rdma/rdma/c/6dc78c53de99e4
[4/6] RDMA/mlx5: Avoid direct access to DMA device pointer
      https://git.kernel.org/rdma/rdma/c/522a5c1c56fbf7
[5/6] RDMA/qedr: Remove unused defines
      https://git.kernel.org/rdma/rdma/c/cc016ebeb146d0
[6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition
      https://git.kernel.org/rdma/rdma/c/325e3b5431ddd2

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


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

end of thread, other threads:[~2026-01-05  9:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
2026-01-05  3:29   ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Leon Romanovsky
2026-01-05  3:45   ` Kalesh Anakkur Purayil
2026-01-05  5:01   ` Zhu Yanjun
2026-01-04 13:51 ` [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow Leon Romanovsky
2026-01-05  3:37   ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer Leon Romanovsky
2026-01-05  3:45   ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines Leon Romanovsky
2026-01-05  3:34   ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition Leon Romanovsky
2026-01-05  3:41   ` Kalesh Anakkur Purayil
2026-01-05  9:07 ` [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®