github ↗
docs menu

Module Rig_mlx5_abi.Receive

A receive entry is one receive of a queue pair's receive ring: the memory the next message from the peer lands in.

Every entry here takes Receive.size bytes, one scatter segment, so entry i of a ring of n entries is at byte 16 * (i mod n). The ring's producer count, the receives posted, is stored at Doorbell.receive of the queue pair's doorbell record. A message longer than its receive fails the receive.

#val size : int

size is 16, the bytes of a scatter segment.

#val write : buffer -> int -> Entry.local -> unit

write b at l writes the receive of up to l.bytes bytes into l in the size bytes of b at byte at. A receive of no bytes takes only a message of no bytes.

Raises Invalid_argument if the bytes are not in b, at is not a multiple of size, l.bytes is not in [0;2{^31}-1], l.key is not in [0;2{^32}-1], or l.address is negative.