monarch_rdma/backend/tcp.rs
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9//! TCP fallback backend for RDMA operations.
10//!
11//! Transfers memory over the default hyperactor channel transport by
12//! chunking buffers into serializable messages. Intended as a fallback
13//! when ibverbs hardware is unavailable.
14
15pub mod manager_actor;
16
17use hyperactor::ActorRef;
18use manager_actor::TcpManagerActor;
19
20use crate::RdmaOpType;
21use crate::local_memory::KeepaliveLocalMemory;
22
23/// A single operation for the [`TcpBackend`](manager_actor::TcpBackend).
24#[derive(Debug)]
25pub struct TcpOp {
26 pub op_type: RdmaOpType,
27 pub local_memory: KeepaliveLocalMemory,
28 pub remote_tcp_manager: ActorRef<TcpManagerActor>,
29 pub remote_buf_id: usize,
30 pub remote_size: usize,
31}