pub struct IbvDevice {
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: Stringname - The name of the RDMA device (e.g., “mlx5_0”).
Implementations§
Source§impl IbvDevice
impl IbvDevice
Sourcepub fn first_available() -> Option<IbvDevice>
pub fn first_available() -> Option<IbvDevice>
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 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<'de> Deserialize<'de> for IbvDevice
impl<'de> Deserialize<'de> for IbvDevice
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>,
Auto Trait Implementations§
impl Freeze for IbvDevice
impl RefUnwindSafe for IbvDevice
impl Send for IbvDevice
impl Sync for IbvDevice
impl Unpin for IbvDevice
impl UnwindSafe for IbvDevice
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§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].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> QuoteExt for Twhere
T: ?Sized,
impl<T> QuoteExt for Twhere
T: ?Sized,
fn push_quoted<'q, Q, S>(&mut self, _q: Q, s: S)where
Q: QuoteInto<T>,
S: Into<Quotable<'q>>,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.