Skip to content

ionic: Add Reorder Completion Queue (RCQ) support#1733

Open
abhijitG-xlnx wants to merge 6 commits into
linux-rdma:masterfrom
abhijitG-xlnx:rcq
Open

ionic: Add Reorder Completion Queue (RCQ) support#1733
abhijitG-xlnx wants to merge 6 commits into
linux-rdma:masterfrom
abhijitG-xlnx:rcq

Conversation

@abhijitG-xlnx

Copy link
Copy Markdown
Contributor

Add RCQ support to the ionic provider for out-of-order receive completion handling.
Patch 1: Update kernel headers for RCQ fields.
Patch 2: Fetch RCQ capabilities on context create.
Patch 3: Add ionic_dv_create_qp_ex DV API.
Patch 4: Process RECV_RCQE completions from poll_cq, delivering them in order.

@abhijitG-xlnx
abhijitG-xlnx force-pushed the rcq branch 3 times, most recently from 2148467 to 1387f53 Compare May 6, 2026 05:11
To commit: ("RDMA/ionic: Support QP transport mode selection in create and modify").

Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Read the IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA flag from core_support
into ctx->robust_udata during context allocation. This allows the
provider to detect whether the kernel supports forward/backward
compatible udata handling, which is a prerequisite for safely using
extended request structs in future verb extensions.

Also zero-initialize uionic_qp, uionic_qp_resp, and uionic_ah_resp
stack variables to prevent stack garbage from leaking into the kernel
via ioctl buffers.

Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Store RCQ sign bit from the kernel response in ionic_ctx.
This field is used to enable the RCQ (Reorder Completion Queue)
feature for out-of-order receive completion handling.

Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Add DV API ionic_dv_create_qp_ex to create QP with custrom flags.
Rename IONIC_V1_CQE_TYPE_RECV_INDIR to IONIC_V1_CQE_TYPE_RECV_RCQE.

Refactor ionic_create_qp_ex into ionic_create_qp_ex_common that accepts
an optional ionic_dv_qp_init_attr_ex. The RQ buffer is extended by
IONIC_RCQ_SIZE (4 KiB) when the RCQ pd_tag is used to support
reorder completion queue.

Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Add support for processing Receive Completion Queue (RCQ) completions
that arrive out-of-order and must be delivered in-order.

Add RCQE hardware structures and inline helpers to ionic_fw_types.h
and ionic_fw.h for parsing RCQE CQE fields (sequence, op, valid/ready
bits) and for RCQ ring header access.

Extend ionic_rq_meta with per-WQE fields (rcqe_st_len, rcqe_op,
rcqe_imm_data_rkey, rcqe_done) to store out-of-order completion data
from RECV_RCQE CQEs until in-order delivery.

Handle IONIC_V1_CQE_TYPE_RECV_RCQE in the CQE type switch and add
the RCQ poll loop after the main CQE processing to deliver in-order
completions.

Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Restructure the expdb WQE size logic in sq_init and rq_init to compute
the non-expdb size first, then conditionally upgrade to the expdb size
if supported. This eliminates the -Werror=maybe-uninitialized warning
on wqe_size and simplifies the control flow.

Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant