From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Selvin Xavier <selvin.xavier@broadcom.com>,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
Krzysztof Czurylo <krzysztof.czurylo@intel.com>,
Tatyana Nikolova <tatyana.e.nikolova@intel.com>,
Yishai Hadas <yishaih@nvidia.com>,
Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH rdma-next 2/2] RDMA: Clarify that CQ resize is a user‑space verb
Date: Wed, 18 Mar 2026 12:02:37 +0200 [thread overview]
Message-ID: <20260318-resize_cq-type-v1-2-b2846ed18846@nvidia.com> (raw)
In-Reply-To: <20260318-resize_cq-type-v1-0-b2846ed18846@nvidia.com>
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
next prev parent reply other threads:[~2026-03-18 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-03-19 14:16 ` [PATCH rdma-next 0/2] RDMA: Clarify that CQ resize is a user-space verb Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318-resize_cq-type-v1-2-b2846ed18846@nvidia.com \
--to=leon@kernel.org \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=krzysztof.czurylo@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=tatyana.e.nikolova@intel.com \
--cc=yishaih@nvidia.com \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox