Struct ibverbs::Device[][src]

pub struct Device<'devlist>(_);

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 (from ibv_query_port_attr).
  • ENOMEM: Out of memory (from ibv_query_port_attr).
  • EMFILE: Too many files are opened by this process (from ibv_query_gid).
  • Other: the device is not in ACTIVE or ARMED 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 family
    • cxgb4 - Chelsio Communications, T4 RDMA family
    • ehca - IBM, eHCA family
    • ipathverbs - QLogic
    • mlx4 - Mellanox Technologies, ConnectX family
    • mthca - Mellanox Technologies, InfiniHost family
    • nes - 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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.