Initial commit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
//! RDMA transport configuration
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// RDMA transport configuration
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct RdmaConfig {
|
||||
/// Device name (e.g., "mlx5_0")
|
||||
pub device_name: Option<String>,
|
||||
/// Port number on the device
|
||||
pub port_num: u8,
|
||||
/// GID index for RoCE
|
||||
pub gid_index: u8,
|
||||
/// Maximum number of send work requests
|
||||
pub max_send_wr: u32,
|
||||
/// Maximum number of receive work requests
|
||||
pub max_recv_wr: u32,
|
||||
/// Maximum scatter/gather entries per work request
|
||||
pub max_sge: u32,
|
||||
/// Maximum inline data size
|
||||
pub max_inline_data: u32,
|
||||
/// Completion queue size
|
||||
pub cq_size: u32,
|
||||
/// Enable GPU Direct RDMA
|
||||
pub enable_gdr: bool,
|
||||
/// Poll timeout in microseconds
|
||||
pub poll_timeout_us: u64,
|
||||
/// Number of completion queue polling threads
|
||||
pub num_cq_poll_threads: usize,
|
||||
}
|
||||
|
||||
impl Default for RdmaConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
device_name: None, // Auto-detect
|
||||
port_num: 1,
|
||||
gid_index: 0,
|
||||
max_send_wr: 1024,
|
||||
max_recv_wr: 1024,
|
||||
max_sge: 4,
|
||||
max_inline_data: 256,
|
||||
cq_size: 4096,
|
||||
enable_gdr: true,
|
||||
poll_timeout_us: 1000,
|
||||
num_cq_poll_threads: 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user