Skip to content

ibverbs: wrap CQ event notifications #113

Description

@perbu

CompletionChannel gives the fd (AsRawFd) and the unsafe comp_channel() handle, and CompletionQueue::cq() gives the unsafe ibv_cq handle but there's no safe ibv_req_notify_cq / ibv_get_cq_event / ibv_ack_cq_events. So event-driven completion handling requires dropping to rdma-mummy-sys.

The arm → wait-on-fd → get/ack → drain → re-arm loop is the standard low-CPU alternative to busy-polling start_poll, and it's what lets an idle connection park instead of spinning a core.

Suggested API

impl CompletionQueue {                 // trait or per-CQ
    pub fn request_notify(&self, solicited_only: bool) -> Result<(), ...>;
    pub fn ack_events(&self, n: u32);
}
impl CompletionChannel {
    pub fn get_event(&self) -> Result<(), ...>; // ibv_get_cq_event
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions