Module Rig_mlx5_abi.Entry
A work entry is one operation of a queue pair's send ring.
Every entry here takes one basic block of Entry.size bytes, so that no entry wraps around the ring's end. Entry i of a ring of n entries is at byte 64 * (i mod n).
val size : intsize is 64, the bytes of a basic block.
type local = {- #
address : int;(*The address the NIC knows the first byte by.
*) - #
bytes : int;(*The length, in bytes.
*) - #
key : int;(*The local key of the region that holds it.
*)
}The type for memory this process registered with its NIC.
type remote = {- #
address : int;(*The address the peer's NIC knows the first byte by.
*) - #
key : int;(*The remote key of the peer's region that holds it.
*)
}The type for memory a peer registered with its NIC.
type op = - #
| Write of {}(*
*)Write {src; dst}copiessrc.bytesbytes fromsrctodst. - #
| Write_inline of {}(*
*)Write_inline {data; dst}copiesdata, which the entry holds, todst. The NIC reads no memory of this process for it. - #
| Read of {}(*
*)Read {src; dst}copiesdst.bytesbytes fromsrctodst. It reads what the writes posted before it on its queue pair wrote. - #
| Send of {}(*
*)Send {src}sends thesrc.bytesbytes ofsrcto the peer, whose NIC lands them in the oldest receive the peer posted.
The type for operations.
type t = {- #
op : op; - #
signal : bool;(*The NIC writes a completion once the entry completes. It writes one for a failed entry whatever
*)signalsays.
}The type for work entries.
val max_inline : intmax_inline is 28, the most bytes a Write_inline carries in one basic block.
write b at ~qp ~index e writes e in the size bytes of b at byte at, as entry number index of queue pair number qp. index is the ring's producer count before the entry, and the NIC reads its low 16 bits.
Raises Invalid_argument if:
- the bytes are not in
b, oratis not a multiple ofsize; qpis not in [0;2{^24}-1], orindexis negative;- a length is not in [
0;2{^31}-1], a key is not in [0;2{^32}-1], or an address is negative; - a
Write_inlinecarries more thanmax_inlinebytes.