pub struct RdmaDevice {
pub name: String,
/* private fields */
}
Expand description
Represents an RDMA device in the system.
This struct encapsulates information about an RDMA device, including its hardware characteristics, capabilities, and port information. It provides access to device attributes such as vendor information, firmware version, and supported features.
§Examples
use monarch_rdma::get_all_devices;
let devices = get_all_devices();
if let Some(device) = devices.first() {
// Access device name and firmware version
let device_name = device.name();
let firmware_version = device.fw_ver();
}
Fields§
§name: String
name
- The name of the RDMA device (e.g., “mlx5_0”).
Implementations§
Source§impl RdmaDevice
impl RdmaDevice
Sourcepub fn first_available() -> Option<RdmaDevice>
pub fn first_available() -> Option<RdmaDevice>
Returns the first available RDMA device, if any.
Sourcepub fn vendor_part_id(&self) -> u32
pub fn vendor_part_id(&self) -> u32
Returns the vendor part ID of the RDMA device.
Sourcepub fn ports(&self) -> &Vec<RdmaPort>
pub fn ports(&self) -> &Vec<RdmaPort>
Returns a reference to the vector of ports available on the RDMA device.
Sourcepub fn max_qp(&self) -> i32
pub fn max_qp(&self) -> i32
Returns the maximum number of queue pairs supported by the RDMA device.
Sourcepub fn max_cq(&self) -> i32
pub fn max_cq(&self) -> i32
Returns the maximum number of completion queues supported by the RDMA device.
Sourcepub fn max_mr(&self) -> i32
pub fn max_mr(&self) -> i32
Returns the maximum number of memory regions supported by the RDMA device.
Sourcepub fn max_pd(&self) -> i32
pub fn max_pd(&self) -> i32
Returns the maximum number of protection domains supported by the RDMA device.
Trait Implementations§
Source§impl Clone for RdmaDevice
impl Clone for RdmaDevice
Source§fn clone(&self) -> RdmaDevice
fn clone(&self) -> RdmaDevice
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RdmaDevice
impl Debug for RdmaDevice
Source§impl Default for RdmaDevice
impl Default for RdmaDevice
Source§impl<'de> Deserialize<'de> for RdmaDevice
impl<'de> Deserialize<'de> for RdmaDevice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for RdmaDevice
impl Display for RdmaDevice
Auto Trait Implementations§
impl Freeze for RdmaDevice
impl RefUnwindSafe for RdmaDevice
impl Send for RdmaDevice
impl Sync for RdmaDevice
impl Unpin for RdmaDevice
impl UnwindSafe for RdmaDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more