Skip to content

[RFC] libibverbs: Introduce Completion Actions verbs - #1865

Open
mrgolin wants to merge 1 commit into
linux-rdma:masterfrom
amzn:ibv-comp-action
Open

mrgolin wants to merge 1 commit into
linux-rdma:masterfrom
amzn:ibv-comp-action

Conversation

@mrgolin

@mrgolin mrgolin commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Extend verbs interface to support Completion Actions that let applications observe the completion of specific work requests without polling a CQ. A completion action is an operation registered with the device that a work request names by its action ID, and the device performs it when the work request completes at the initiator or at the target. This is mostly useful for transports that complete work requests out of order, where a completion count alone doesn't tell which requests have completed.

As a first type introduce memory completion actions, which modify application memory with a value supplied by the initiator's work request.

Extend verbs interface to support Completion Actions that let
applications observe the completion of specific work requests without
polling a CQ. A completion action is an operation registered with the
device that a work request names by its action ID, and the device
performs it when the work request completes at the initiator or at
the target. This is mostly useful for transports that complete work
requests out of order, where a completion count alone doesn't tell
which requests have completed.

As a first type introduce memory completion actions, which modify
application memory with a value supplied by the initiator's work
request.

Expose completion action capabilities through a dedicated query verb.

Reviewed-by: Ilia Kolominsky <ikolomin@amazon.com>
Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
Comment thread libibverbs/verbs.h
* @attr: Attributes for the memory completion action.
*/
struct ibv_mem_comp_action *
ibv_create_mem_comp_action(struct ibv_pd *pd,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would define a more general and extensible user-facing API. E.g. ibv_create_comp_action(...). The attribute should include what type of action, which is currently a single option buf_write. Plus action specific input: ibv_buf, offset, len, value

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a common struct ibv_comp_action that is used wherever the action type doesn't matter, e.g. destroy. We kept separate create functions for two reasons:

  1. We plan to follow up with counter completion actions, which share no attributes with memory actions apart from the PD.
  2. Returning a concrete type lets us add per-type operations later, e.g. reset action state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that every type requires new APIs and updates to other structures, like work requests.. It's somewhat equivalent to every QP type having separate API calls and structs.

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.

2 participants