]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ofed/libibverbs/man/ibv_open_xrc_domain.3
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ofed / libibverbs / man / ibv_open_xrc_domain.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_OPEN_XRC_DOMAIN 3 2008-02-10 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_open_xrc_domain, ibv_close_xrc_domain \- open or close an eXtended Reliable Connection (XRC) domain
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <fcntl.h>
9 .B #include <infiniband/verbs.h>
10 .sp
11 .BI "struct ibv_xrc_domain *ibv_open_xrc_domain(struct ibv_context " "*context" ","
12 .BI "                                           int " "fd" ", int " "oflag" );
13 .nl
14 .BI "int ibv_close_xrc_domain(struct ibv_xrc_domain " "*d" );
15 .fi
16 .SH "DESCRIPTION"
17 .B ibv_open_xrc_domain()
18 open an XRC domain for the InfiniBand device context 
19 .I context
20 or return a reference to an opened one\fR.
21 .I fd
22 is the file descriptor to be associated with the XRC domain.
23 The argument
24 .I oflag
25 describes the desired file creation attributes;  it  is either 0 or the bitwise OR of one or more of the following flags:
26 .PP
27 .TP
28 .B O_CREAT
29 If a domain belonging to device named by context is already associated with the inode, this flag has
30 no effect, except as noted under
31 .BR O_EXCL
32 below. Otherwise, a new XRC domain is created and is associated with inode specified by
33 .IR fd\fR.
34 .TP
35 .B O_EXCL
36 If 
37 .BR O_EXCL
38 and
39 .BR O_CREAT
40 are set, open will fail if a domain associated with the inode exists.
41 The check for the existence of the domain and creation
42 of the domain if it does not exist is atomic with respect to other
43 processes executing open with
44 .IR fd
45 naming the same inode.
46 .PP
47 If 
48 .I fd
49 equals -1, no inode is is associated with the domain, and the only valid value for
50 .I oflag
51 is
52 .B O_CREAT\fR.
53 .PP
54 .B ibv_close_xrc_domain()
55 closes the XRC domain
56 .I d\fR.
57 If this is the last reference, the XRC domain will be destroyed.
58 .SH "RETURN VALUE"
59 .B ibv_open_xrc_domain()
60 returns a pointer to an opened XRC, or NULL if the request fails.
61 .PP
62 .B ibv_close_xrc_domain()
63 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
64 .SH "NOTES"
65 Not all devices support XRC. To check if a device supports it, check if the
66 .B IBV_DEVICE_XRC
67 bit is set in the device capabilities flags.
68 .PP
69 .B ibv_close_xrc_domain()
70 may fail if any QP or SRQ are still associated with the XRC domain being closed.
71 .SH "SEE ALSO"
72 .BR ibv_create_xrc_srq (3),
73 .BR ibv_create_qp (3),
74 .BR ibv_create_xrc_rcv_qp (3),
75 .BR ibv_modify_xrc_rcv_qp (3),
76 .BR ibv_query_xrc_rcv_qp (3),
77 .BR ibv_reg_xrc_rcv_qp (3)
78 .SH "AUTHORS"
79 .TP
80 Dotan Barak <dotanb@mellanox.co.il>