]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_open_device.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_open_device.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_OPEN_DEVICE 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_open_device, ibv_close_device \- open and close an RDMA device context
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "struct ibv_context *ibv_open_device(struct ibv_device " "*device" ");
11 .sp
12 .BI "int ibv_close_device(struct ibv_context " "*context" ");
13 .fi
14 .SH "DESCRIPTION"
15 .B ibv_open_device()
16 opens the device
17 .I device
18 and creates a context for further use.
19 .PP
20 .B ibv_close_device()
21 closes the device context
22 .I context\fR.
23 .SH "RETURN VALUE"
24 .B ibv_open_device()
25 returns a pointer to the allocated device context, or NULL if the request fails.
26 .PP
27 .B ibv_close_device()
28 returns 0 on success, \-1 on failure.
29 .SH "NOTES"
30 .B ibv_close_device()
31 does not release all the resources allocated using context
32 .I context\fR.
33 To avoid resource leaks, the user should release all associated
34 resources before closing a context.
35 .SH "SEE ALSO"
36 .BR ibv_get_device_list (3),
37 .BR ibv_query_device (3),
38 .BR ibv_query_port (3),
39 .BR ibv_query_gid (3),
40 .BR ibv_query_pkey (3)
41 .SH "AUTHORS"
42 .TP
43 Dotan Barak <dotanb@mellanox.co.il>