* [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb
@ 2026-03-18 10:02 Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 1/2] RDMA/core: Remove unused ib_resize_cq() implementation Leon Romanovsky
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2026-03-18 10:02 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky, Selvin Xavier, Kalesh AP,
Krzysztof Czurylo, Tatyana Nikolova, Yishai Hadas,
Dennis Dalessandro, Zhu Yanjun
Cc: linux-rdma, linux-kernel
Let's start to clean resize CQ path.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Leon Romanovsky (2):
RDMA/core: Remove unused ib_resize_cq() implementation
RDMA: Clarify that CQ resize is a user‑space verb
drivers/infiniband/core/device.c | 2 +-
drivers/infiniband/core/uverbs_cmd.c | 4 ++--
drivers/infiniband/core/verbs.c | 10 ----------
drivers/infiniband/hw/bnxt_re/main.c | 2 +-
drivers/infiniband/hw/irdma/verbs.c | 2 +-
drivers/infiniband/hw/mlx4/main.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 2 +-
drivers/infiniband/hw/mthca/mthca_provider.c | 2 +-
drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +-
drivers/infiniband/sw/rdmavt/vt.c | 2 +-
drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
include/rdma/ib_verbs.h | 12 ++----------
12 files changed, 13 insertions(+), 31 deletions(-)
---
base-commit: 5122be2a19aa0fc512ea689fd1064f7e05b45d17
change-id: 20260318-resize_cq-type-a6208c447068
Best regards,
--
Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH rdma-next 1/2] RDMA/core: Remove unused ib_resize_cq() implementation
2026-03-18 10:02 [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
@ 2026-03-18 10:02 ` Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 2/2] RDMA: Clarify that CQ resize is a user‑space verb Leon Romanovsky
2026-03-19 14:16 ` [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2026-03-18 10:02 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky, Selvin Xavier, Kalesh AP,
Krzysztof Czurylo, Tatyana Nikolova, Yishai Hadas,
Dennis Dalessandro, Zhu Yanjun
Cc: linux-rdma, linux-kernel
From: Leon Romanovsky <leonro@nvidia.com>
There are no in-kernel users of the CQ resize functionality, so drop it.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/core/verbs.c | 10 ----------
include/rdma/ib_verbs.h | 9 ---------
2 files changed, 19 deletions(-)
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 721cd43212380..bac87de9cc673 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -2264,16 +2264,6 @@ int ib_destroy_cq_user(struct ib_cq *cq, struct ib_udata *udata)
}
EXPORT_SYMBOL(ib_destroy_cq_user);
-int ib_resize_cq(struct ib_cq *cq, int cqe)
-{
- if (cq->shared)
- return -EOPNOTSUPP;
-
- return cq->device->ops.resize_cq ?
- cq->device->ops.resize_cq(cq, cqe, NULL) : -EOPNOTSUPP;
-}
-EXPORT_SYMBOL(ib_resize_cq);
-
/* Memory regions */
struct ib_mr *ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 57b81ca0fabdc..37260d37144c5 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4103,15 +4103,6 @@ struct ib_cq *__ib_create_cq(struct ib_device *device,
#define ib_create_cq(device, cmp_hndlr, evt_hndlr, cq_ctxt, cq_attr) \
__ib_create_cq((device), (cmp_hndlr), (evt_hndlr), (cq_ctxt), (cq_attr), KBUILD_MODNAME)
-/**
- * ib_resize_cq - Modifies the capacity of the CQ.
- * @cq: The CQ to resize.
- * @cqe: The minimum size of the CQ.
- *
- * Users can examine the cq structure to determine the actual CQ size.
- */
-int ib_resize_cq(struct ib_cq *cq, int cqe);
-
/**
* rdma_set_cq_moderation - Modifies moderation params of the CQ
* @cq: The CQ to modify.
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH rdma-next 2/2] RDMA: Clarify that CQ resize is a user‑space verb
2026-03-18 10:02 [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 1/2] RDMA/core: Remove unused ib_resize_cq() implementation Leon Romanovsky
@ 2026-03-18 10:02 ` Leon Romanovsky
2026-03-19 14:16 ` [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2026-03-18 10:02 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky, Selvin Xavier, Kalesh AP,
Krzysztof Czurylo, Tatyana Nikolova, Yishai Hadas,
Dennis Dalessandro, Zhu Yanjun
Cc: linux-rdma, linux-kernel
From: Leon Romanovsky <leonro@nvidia.com>
The CQ resize operation is used only by uverbs. Make this explicit.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/core/device.c | 2 +-
drivers/infiniband/core/uverbs_cmd.c | 4 ++--
drivers/infiniband/hw/bnxt_re/main.c | 2 +-
drivers/infiniband/hw/irdma/verbs.c | 2 +-
drivers/infiniband/hw/mlx4/main.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 2 +-
drivers/infiniband/hw/mthca/mthca_provider.c | 2 +-
drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +-
drivers/infiniband/sw/rdmavt/vt.c | 2 +-
drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
include/rdma/ib_verbs.h | 3 ++-
11 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 236061a33bf67..4c174f7f1070c 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -2832,7 +2832,7 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
SET_DEVICE_OP(dev_ops, reg_user_mr_dmabuf);
SET_DEVICE_OP(dev_ops, req_notify_cq);
SET_DEVICE_OP(dev_ops, rereg_user_mr);
- SET_DEVICE_OP(dev_ops, resize_cq);
+ SET_DEVICE_OP(dev_ops, resize_user_cq);
SET_DEVICE_OP(dev_ops, set_vf_guid);
SET_DEVICE_OP(dev_ops, set_vf_link_state);
SET_DEVICE_OP(dev_ops, ufile_hw_cleanup);
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index f31650ef7bc34..25741db2c8f64 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1142,7 +1142,7 @@ static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
if (IS_ERR(cq))
return PTR_ERR(cq);
- ret = cq->device->ops.resize_cq(cq, cmd.cqe, &attrs->driver_udata);
+ ret = cq->device->ops.resize_user_cq(cq, cmd.cqe, &attrs->driver_udata);
if (ret)
goto out;
@@ -3801,7 +3801,7 @@ const struct uapi_definition uverbs_def_write_intf[] = {
UAPI_DEF_WRITE_UDATA_IO(
struct ib_uverbs_resize_cq,
struct ib_uverbs_resize_cq_resp),
- UAPI_DEF_METHOD_NEEDS_FN(resize_cq)),
+ UAPI_DEF_METHOD_NEEDS_FN(resize_user_cq)),
DECLARE_UVERBS_WRITE_EX(
IB_USER_VERBS_EX_CMD_CREATE_CQ,
ib_uverbs_ex_create_cq,
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 13ad63b9b1de7..0578114730b0e 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1374,7 +1374,7 @@ static const struct ib_device_ops bnxt_re_dev_ops = {
.reg_user_mr = bnxt_re_reg_user_mr,
.reg_user_mr_dmabuf = bnxt_re_reg_user_mr_dmabuf,
.req_notify_cq = bnxt_re_req_notify_cq,
- .resize_cq = bnxt_re_resize_cq,
+ .resize_user_cq = bnxt_re_resize_cq,
.create_flow = bnxt_re_create_flow,
.destroy_flow = bnxt_re_destroy_flow,
INIT_RDMA_OBJ_SIZE(ib_ah, bnxt_re_ah, ib_ah),
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 1d0c2d8453a8a..740a770199f7f 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -5461,7 +5461,7 @@ static const struct ib_device_ops irdma_dev_ops = {
.reg_user_mr_dmabuf = irdma_reg_user_mr_dmabuf,
.rereg_user_mr = irdma_rereg_user_mr,
.req_notify_cq = irdma_req_notify_cq,
- .resize_cq = irdma_resize_cq,
+ .resize_user_cq = irdma_resize_cq,
INIT_RDMA_OBJ_SIZE(ib_pd, irdma_pd, ibpd),
INIT_RDMA_OBJ_SIZE(ib_ucontext, irdma_ucontext, ibucontext),
INIT_RDMA_OBJ_SIZE(ib_ah, irdma_ah, ibah),
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 73e17b4339eb6..900637e4db0ed 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -2568,7 +2568,7 @@ static const struct ib_device_ops mlx4_ib_dev_ops = {
.reg_user_mr = mlx4_ib_reg_user_mr,
.req_notify_cq = mlx4_ib_arm_cq,
.rereg_user_mr = mlx4_ib_rereg_user_mr,
- .resize_cq = mlx4_ib_resize_cq,
+ .resize_user_cq = mlx4_ib_resize_cq,
.report_port_event = mlx4_ib_port_event,
INIT_RDMA_OBJ_SIZE(ib_ah, mlx4_ib_ah, ibah),
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index ff2c02c85625c..b74bf26976550 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4612,7 +4612,7 @@ static const struct ib_device_ops mlx5_ib_dev_ops = {
.reg_user_mr_dmabuf = mlx5_ib_reg_user_mr_dmabuf,
.req_notify_cq = mlx5_ib_arm_cq,
.rereg_user_mr = mlx5_ib_rereg_user_mr,
- .resize_cq = mlx5_ib_resize_cq,
+ .resize_user_cq = mlx5_ib_resize_cq,
.ufile_hw_cleanup = mlx5_ib_ufile_hw_cleanup,
INIT_RDMA_OBJ_SIZE(ib_ah, mlx5_ib_ah, ibah),
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 6a0795332616d..d81806ef12e53 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -1096,7 +1096,7 @@ static const struct ib_device_ops mthca_dev_ops = {
.query_port = mthca_query_port,
.query_qp = mthca_query_qp,
.reg_user_mr = mthca_reg_user_mr,
- .resize_cq = mthca_resize_cq,
+ .resize_user_cq = mthca_resize_cq,
INIT_RDMA_OBJ_SIZE(ib_ah, mthca_ah, ibah),
INIT_RDMA_OBJ_SIZE(ib_cq, mthca_cq, ibcq),
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
index b62a9bf160c52..a448748472082 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
@@ -166,7 +166,7 @@ static const struct ib_device_ops ocrdma_dev_ops = {
.query_qp = ocrdma_query_qp,
.reg_user_mr = ocrdma_reg_user_mr,
.req_notify_cq = ocrdma_arm_cq,
- .resize_cq = ocrdma_resize_cq,
+ .resize_user_cq = ocrdma_resize_cq,
INIT_RDMA_OBJ_SIZE(ib_ah, ocrdma_ah, ibah),
INIT_RDMA_OBJ_SIZE(ib_cq, ocrdma_cq, ibcq),
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index 033d8932aff16..40aa642083647 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -375,7 +375,7 @@ static const struct ib_device_ops rvt_dev_ops = {
.query_srq = rvt_query_srq,
.reg_user_mr = rvt_reg_user_mr,
.req_notify_cq = rvt_req_notify_cq,
- .resize_cq = rvt_resize_cq,
+ .resize_user_cq = rvt_resize_cq,
INIT_RDMA_OBJ_SIZE(ib_ah, rvt_ah, ibah),
INIT_RDMA_OBJ_SIZE(ib_cq, rvt_cq, ibcq),
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index fe41362c51444..2be4fd68276dc 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -1519,7 +1519,7 @@ static const struct ib_device_ops rxe_dev_ops = {
.reg_user_mr = rxe_reg_user_mr,
.req_notify_cq = rxe_req_notify_cq,
.rereg_user_mr = rxe_rereg_user_mr,
- .resize_cq = rxe_resize_cq,
+ .resize_user_cq = rxe_resize_cq,
INIT_RDMA_OBJ_SIZE(ib_ah, rxe_ah, ibah),
INIT_RDMA_OBJ_SIZE(ib_cq, rxe_cq, ibcq),
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 37260d37144c5..e53c6ed66f34a 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2634,7 +2634,8 @@ struct ib_device_ops {
struct uverbs_attr_bundle *attrs);
int (*modify_cq)(struct ib_cq *cq, u16 cq_count, u16 cq_period);
int (*destroy_cq)(struct ib_cq *cq, struct ib_udata *udata);
- int (*resize_cq)(struct ib_cq *cq, int cqe, struct ib_udata *udata);
+ int (*resize_user_cq)(struct ib_cq *cq, int cqe,
+ struct ib_udata *udata);
/*
* pre_destroy_cq - Prevent a cq from generating any new work
* completions, but not free any kernel resources
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb
2026-03-18 10:02 [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 1/2] RDMA/core: Remove unused ib_resize_cq() implementation Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 2/2] RDMA: Clarify that CQ resize is a user‑space verb Leon Romanovsky
@ 2026-03-19 14:16 ` Leon Romanovsky
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2026-03-19 14:16 UTC (permalink / raw)
To: Jason Gunthorpe, Selvin Xavier, Kalesh AP, Krzysztof Czurylo,
Tatyana Nikolova, Yishai Hadas, Dennis Dalessandro, Zhu Yanjun,
Leon Romanovsky
Cc: linux-rdma, linux-kernel
On Wed, 18 Mar 2026 12:02:35 +0200, Leon Romanovsky wrote:
> Let's start to clean resize CQ path.
Applied, thanks!
[1/2] RDMA/core: Remove unused ib_resize_cq() implementation
https://git.kernel.org/rdma/rdma/c/137b01dd466fa4
[2/2] RDMA: Clarify that CQ resize is a user‑space verb
https://git.kernel.org/rdma/rdma/c/90b7abe25ce9b8
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-19 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-18 10:02 [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 1/2] RDMA/core: Remove unused ib_resize_cq() implementation Leon Romanovsky
2026-03-18 10:02 ` [PATCH rdma-next 2/2] RDMA: Clarify that CQ resize is a user‑space verb Leon Romanovsky
2026-03-19 14:16 ` [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb 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®