1IBV_OPEN_DEVICE(3)      Libibverbs Programmer's Manual      IBV_OPEN_DEVICE(3)
2
3
4

NAME

6       ibv_open_device,  ibv_close_device - open and close an RDMA device con‐
7       text
8

SYNOPSIS

10       #include <infiniband/verbs.h>
11
12       struct ibv_context *ibv_open_device(struct ibv_device *device);
13
14       int ibv_close_device(struct ibv_context *context);
15

DESCRIPTION

17       ibv_open_device() opens the device device and  creates  a  context  for
18       further use.
19
20       ibv_close_device() closes the device context context.
21

RETURN VALUE

23       ibv_open_device() returns a pointer to the allocated device context, or
24       NULL if the request fails.
25
26       ibv_close_device() returns 0 on success, -1 on failure.
27

NOTES

29       ibv_close_device() does not release all the resources  allocated  using
30       context  context.  To avoid resource leaks, the user should release all
31       associated resources before closing a context.
32
33       Setting the environment variable **RDMAV_ALLOW_DISASSOC_DESTROY** tells
34       the  library to relate an EIO from destroy commands as a success as the
35       kernel resources were already released. This comes  to  prevent  memory
36       leakage in the user space area upon device disassociation. Applications
37       using this flag cannot  call  ibv_get_cq_event  or  ibv_get_async_event
38       concurrently with any call to an object destruction function.
39
40

SEE ALSO

42       ibv_get_device_list(3),     ibv_query_device(3),     ibv_query_port(3),
43       ibv_query_gid(3), ibv_query_pkey(3)
44

AUTHORS

46       Dotan Barak <dotanba@gmail.com>
47
48
49
50libibverbs                        2006-10-31                IBV_OPEN_DEVICE(3)
Impressum