Module Rig_mlx5.Cq
A completion queue is a ring where the NIC reports the entries that completed.
type tThe type for completion queues.
make nic n is a completion queue of nic with room for n completions, n rounded up to a power of two no smaller than 2. Its queue pairs hold at most that many entries and receives together (Qp.make), so it never overflows.
It is Error msg if the rounded n is more than a completion queue of nic holds, as its kernel driver reports, or more than 224; msg then names the bound. It is also Error msg if the kernel refuses or the process cannot allocate the ring.
Raises Invalid_argument if n < 1.
val poll : t -> Rig_mlx5_abi.Completion.t optionpoll cq is the next completion of cq, which it consumes, or None if the NIC wrote none after those poll consumed.
arm cq asks cq's NIC to raise one Completion event at the next completion of cq after those poll consumed.
destroy cq destroys cq and frees its ring.
It is Error msg if the kernel refuses, as it does while it keeps a queue pair of cq that it refused to destroy. cq then counts as destroyed and its ring is freed all the same.
Raises Invalid_argument if a queue pair of cq is not destroyed.