Skip to main content

Module device

Module device 

Source
Expand description

Backend-agnostic ibverbs device abstraction.

[IbvDevice] owns the per-process state for a single opened RDMA device: an Arc<IbvContext>, an IbvConfig, and a map of named [IbvDomain]s allocated against the device. Per-backend behavior — claiming a device as the backend’s, allocating a domain, and seeding config defaults — is provided by an IbvDeviceImpl.

Each IbvDeviceImpl registers itself via the inventory crate (using [register_ibv_device_impl!]). At first access, [DEVICE_NAMES_BY_IMPL] walks the ibverbs device list once and assigns each device to the first registered impl whose IbvDeviceImpl::is_instance claims it, caching the resulting typename() → device-infos map. [IbvDevice::open] consults this map: it returns None when name is not advertised under I::typename(), and otherwise opens the device using the cached IbvDeviceInfo.

Structs§

IbvDeviceImplRegistration
Inventory entry submitted by [register_ibv_device_impl!] for each concrete IbvDeviceImpl. Captures function pointers to the impl’s typename(), backend_name(), and is_instance(), all erased of the concrete type.

Traits§

IbvDeviceImpl
Per-backend driver for [IbvDevice]. Concrete impls register themselves via [register_ibv_device_impl!].

Functions§

list_all_devices
All RDMA devices on this host, across every registered backend impl. Reads the [DEVICE_NAMES_BY_IMPL] registry, built on first access by a single walk of the ibverbs device list.