ibv_open_device, ibv_close_device

Opens, and closes an RDMA device context.

Syntax

#include <rdma/verbs.h>
struct ibv_context *ibv_open_device(struct ibv_device *device);
int ibv_close_device(struct ibv_context *context);

Description

The ibv_open_device() routine opens the device device, and creates a context for further use.

The ibv_close_device() routine closes the device context context.

Note: The ibv_close_device() routine does not release all the resources allocated using the parameter context. To avoid resource leaks, you must release all associated resources before closing a context.

Parameter

devices struct ibv_device for the required device.

Return Value

The ibv_open_device, and ibv_close_device functions return a verbs context that can be used for future operations on the device, on success, and returns NULL if the device=NULL or the open operation fails.

[ Feedback ]