docs.rs failed to build dma-libfabric-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
dma-libfabric
Server-initiated one-sided RMA over libfabric. The server
writes (fi_writemsg) or reads (fi_read) a buffer that a peer has registered and advertised.
Requirements
- libfabric, discoverable via
pkg-config - Rust 1.95+
Providers
Provider |
libfabric provider | Notes |
|---|---|---|
Tcp |
tcp |
No RDMA hardware needed. |
EfaDirect |
efa |
Pinned to the efa-direct fabric name. |
Usage
- Build a
Configurationand aPool, thenFabricService::startwith aBatchCompleter.asynchronous::FabricServicereturns futures instead of taking a completer. - Implement
Operandson your per-transfer context:source()forDirection::ToPeer,allocate()forDirection::FromPeer. - Send
FabricService::local_address()to the peer over your own control channel (e.g., RESP). - Receive the peer's
Advertisement(address, rkey, remote address) over that channel. submitaTransferRequest. TheCompletioncomes back with your context and theOutcome.remove_peerwhen the peer disconnects.
register pins a caller-owned MemoryRegion, and operands within it skip fi_mr_reg. Without
doing that, providers that need FI_MR_LOCAL (e.g., efa) register each operand per transfer.
Alternatively your Operands can return a CacheableSpan and you call invalidate before
that memory span is reclaimed.
Examples
# terminal 1: passive peer; prints `advertisement: <address-hex> <rkey> <remote-addr>`
cargo run -p dma-libfabric --example one_target -- 127.0.0.1
# terminal 2
cargo run -p dma-libfabric --example one_transfer -- 127.0.0.1 <address-hex> <rkey> <remote-addr>
efa-direct reverses the order. On efa, the peer must hold the initiator's address before it can be referenced.
# instance 1: initiator; prints `local address: <initiator-hex>`, then waits on stdin
cargo run -p dma-libfabric --example one_transfer -- --efa
# instance 2: passive peer; prints `advertisement: <address-hex> <rkey> <remote-addr>`
cargo run -p dma-libfabric --example one_target -- --efa <initiator-hex>
# paste <address-hex> <rkey> <remote-addr> into instance 1's stdin
| Example | Shows |
|---|---|
one_target |
The passive peer the other examples RMA against. |
one_transfer |
One ToPeer write with a BatchCompleter. |
async_transfer |
The same with asynchronous::FabricService. |
registered_arena |
A payload inside a pre-registered MemoryRegion. |
read_from_peer |
One FromPeer read; run one_target --read. |
License
Apache-2.0