Module wire

Module wire 

Source
Expand description

The golden handshake wire codecs (both server-param dialects, rails framing, mode/status bytes) — un-gated, a frozen external wire contract.

Structs§

CacheServerParams
The peer’s half of the RW-blade handshake (KV overflow / SSM snapshots): its QP identity + the single RW MR.
VerbsClientParams
The client’s half: just its QP identity (its arena MR is local-only).
VerbsServerParams
The server’s half of the verbs handshake (RO dialect: expert / weight / LoRA tiers): its QP identity plus, per MoE layer (or per shard), the base virtual address + rkey of that entry’s registered MR. remote_addr(layer, expert) = layers[layer].0 + expert * record_stride.

Constants§

MODE_TCP
Two-sided TCP record streaming (the expert record path).
MODE_VERBS
One-sided RDMA READ over verbs: the server publishes its store’s MRs and the client READs records directly into its arena.
STATUS_ERR
STATUS_OK

Traits§

RemoteQp
Anything that carries a remote QP identity a client rail can connect to. Implemented by both server-param dialects so the RailSet handshake tail is shared without homogenizing the two wire layouts.

Functions§

read_server_rails
Read want per-rail VerbsServerParams framed by a leading [u8 n_rails]. Bails if the framed count is zero, absurd (> 8), or != want — the client already negotiated want rails, so any other count is a protocol error.
write_server_rails
Frame N per-rail VerbsServerParams for the dual-rail RO tiers: a leading [u8 n_rails] count followed by each rail’s params — exactly how the RW blade frames its per-rail CacheServerParams. Single-rail (n == 1) is the default, byte-for-byte the pre-dual-rail path plus the one-byte count prefix.