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 std::sync::Arc;
18
19use hyperactor::ActorRef;
20use manager_actor::TcpManagerActor;
21
22use crate::RdmaLocalMemory;
23use crate::RdmaOpType;
24
25/// A single operation for the [`TcpSubmit`] local message.
26#[derive(Debug)]
27pub struct TcpOp {
28    pub op_type: RdmaOpType,
29    pub local_memory: Arc<dyn RdmaLocalMemory>,
30    pub remote_tcp_manager: ActorRef<TcpManagerActor>,
31    pub remote_buf_id: usize,
32}