Struct ibverbs::Device [−][src]
An RDMA device.
Implementations
impl<'devlist> Device<'devlist>
[src]
pub fn open(&self) -> Result<Context>
[src]
Opens an RMDA device and creates a context for further use.
This context will later be used to query its resources or for creating resources.
Unlike what the verb name suggests, it doesn’t actually open the device. This device was opened by the kernel low-level driver and may be used by other user/kernel level code. This verb only opens a context to allow user level applications to use it.
Errors
EINVAL
:PORT_NUM
is invalid (fromibv_query_port_attr
).ENOMEM
: Out of memory (fromibv_query_port_attr
).EMFILE
: Too many files are opened by this process (fromibv_query_gid
).- Other: the device is not in
ACTIVE
orARMED
state.
pub fn name(&self) -> Option<&'devlist CStr>
[src]
Returns a string of the name, which is associated with this RDMA device.
This name is unique within a specific machine (the same name cannot be assigned to more than one device). However, this name isn’t unique across an InfiniBand fabric (this name can be found in different machines).
When there are more than one RDMA devices in a computer, changing the device location in
the computer (i.e. in the PCI bus) may result a change in the names associated with the
devices. In order to distinguish between the device, it is recommended using the device
GUID, returned by Device::guid
.
The name is composed from:
- a prefix which describes the RDMA device vendor and model
cxgb3
- Chelsio Communications, T3 RDMA familycxgb4
- Chelsio Communications, T4 RDMA familyehca
- IBM, eHCA familyipathverbs
- QLogicmlx4
- Mellanox Technologies, ConnectX familymthca
- Mellanox Technologies, InfiniHost familynes
- Intel, Intel-NE family
- an index that helps to differentiate between several devices from the same vendor and family in the same computer
pub fn guid(&self) -> Result<u64>
[src]
Returns the Global Unique IDentifier (GUID) of this RDMA device.
This GUID, that was assigned to this device by its vendor during the manufacturing, is unique and can be used as an identifier to an RDMA device.
From the prefix of the RDMA device GUID, one can know who is the vendor of that device using the IEEE OUI.
Errors
EMFILE
: Too many files are opened by this process.
Trait Implementations
impl<'d> From<&'d *mut ibv_device> for Device<'d>
[src]
fn from(d: &'d *mut ibv_device) -> Self
[src]
impl<'devlist> Send for Device<'devlist>
[src]
impl<'devlist> Sync for Device<'devlist>
[src]
Auto Trait Implementations
impl<'devlist> RefUnwindSafe for Device<'devlist>
impl<'devlist> Unpin for Device<'devlist>
impl<'devlist> UnwindSafe for Device<'devlist>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,