ibv_import_device(3)

ibv_import_device3

Import a device from a given command fd

Usage

#include <infiniband/verbs.h>
struct ibv_context *ibv_import_device(int cmd_fd);

Overview

ibv_import_device() returns an ibv_context pointer that is associated with the given cmd_fd.

The cmd_fd is obtained from the ibv_context cmd_fd member, which must be dup’d (eg by dup(), SCM_RIGHTS, etc) before being passed to ibv_import_device().

Once the ibv_context usage has been ended ibv_close_device() should be called. This call may cleanup whatever is needed/opposite of the import including closing the command FD.

Return value

ibv_import_device() returns a pointer to the allocated RDMA context, or NULL if the request fails, and errno is set to indicate the reason.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

Author

Yishai Hadas ⟨[email protected]⟩\c

From rdma-core 65.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.