pub struct IbvDeviceInfo {
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::backend::ibverbs::device::list_all_devices;
let devices = list_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: Stringname - The name of the RDMA device (e.g., “mlx5_0”).
Implementations§
Source§impl IbvDeviceInfo
impl IbvDeviceInfo
Sourcepub fn first_available() -> Option<IbvDeviceInfo>
pub fn first_available() -> Option<IbvDeviceInfo>
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<IbvPort>
pub fn ports(&self) -> &Vec<IbvPort>
Returns a reference to the vector of ports available on the RDMA device.
Sourcepub fn port(&self, port_num: u8) -> Option<&IbvPort>
pub fn port(&self, port_num: u8) -> Option<&IbvPort>
Returns the port with the given port_num, if present.
Sourcepub fn port_speed_mbytes_per_sec(&self) -> u32
pub fn port_speed_mbytes_per_sec(&self) -> u32
Aggregate bandwidth (MB/s) of the device’s fastest active port,
derived from its IB active_speed / active_width. 0 if no port
is active, which ranks the device at the worst case.
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.
Source§impl IbvDeviceInfo
impl IbvDeviceInfo
Sourcepub fn default<I: IbvDeviceImpl>() -> Self
pub fn default<I: IbvDeviceImpl>() -> Self
The optimal default device of backend I: the best NIC for CPU
memory on any NUMA node. Panics if I has no devices.
Trait Implementations§
Source§impl Clone for IbvDeviceInfo
impl Clone for IbvDeviceInfo
Source§fn clone(&self) -> IbvDeviceInfo
fn clone(&self) -> IbvDeviceInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IbvDeviceInfo
impl Debug for IbvDeviceInfo
Source§impl<'de> Deserialize<'de> for IbvDeviceInfo
impl<'de> Deserialize<'de> for IbvDeviceInfo
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 IbvDeviceInfo
impl Display for IbvDeviceInfo
Auto Trait Implementations§
impl Freeze for IbvDeviceInfo
impl RefUnwindSafe for IbvDeviceInfo
impl Send for IbvDeviceInfo
impl Sync for IbvDeviceInfo
impl Unpin for IbvDeviceInfo
impl UnsafeUnpin for IbvDeviceInfo
impl UnwindSafe for IbvDeviceInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].