Debian Codegraph @

libibverbs/man/ibv_open_xrcd.3

raw
1 .\" -*- nroff -*-
2 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
3 .\"
4 .TH IBV_OPEN_XRCD 3 2011-06-17 libibverbs "Libibverbs Programmer's Manual"
5 .SH "NAME"
6 ibv_open_xrcd, ibv_close_xrcd \- open or close an XRC protection domain (XRCDs)
7 .SH "SYNOPSIS"
8 .nf
9 .B #include <infiniband/verbs.h>
10 .sp
11 .BI "struct ibv_xrcd *ibv_open_xrcd(struct ibv_context " "*context" ","
12 .BI " struct ibv_xrcd_init_attr " "*xrcd_init_attr" );
13 .sp
14 .BI "int ibv_close_xrcd(struct ibv_xrcd " "*xrcd" );
15 .fi
16 .SH "DESCRIPTION"
17 .B ibv_open_xrcd()
18 open an XRC domain for the RDMA device context
19 .I context
20 .I xrcd_init_attr
21 is an ibv_xrcd_init_attr struct, as defined in <infiniband/verbs.h>.
22 .PP
23 .nf
24 struct ibv_xrcd_init_attr {
25 .in +8
26 uint32_t comp_mask; /* Identifies valid fields */
27 int fd;
28 int oflag;
29 .fi
30 .PP
31 .I fd
32 is the file descriptor to associate with the XRCD.
33 .I oflag
34 describes the desired creation attributes. It is a bitwise OR of zero or more
35 of the following flags:
36 .PP
37 .TP
38 .B O_CREAT
39 Indicates that an XRCD should be created and associated with the inode referenced
40 by the given fd. If the XRCD exists, this flag has no effect except as noted under
41 .BR O_EXCL
42 below.\fR
43 .TP
44 .B O_EXCL
45 If
46 .BR O_EXCL
47 and
48 .BR O_CREAT
49 are set, open will fail if an XRCD associated with the inode exists.
50 .PP
51 If
52 .I fd
53 equals -1, no inode is associated with the XRCD. To indicate that XRCD should be created, use
54 .I oflag
55 =
56 .B O_CREAT\fR.
57 .PP
58 .B ibv_close_xrcd()
59 closes the XRCD
60 .I xrcd\fR.
61 If this is the last reference, the XRCD will be destroyed.
62 .SH "RETURN VALUE"
63 .B ibv_open_xrcd()
64 returns a pointer to the opened XRCD, or NULL if the request fails.
65 .PP
66 .B ibv_close_xrcd()
67 returns 0 on success, or the value of errno on failure (which indicates the
68 failure reason).
69 .SH "NOTES"
70 .B ibv_close_xrcd()
71 may fail if any other resource is still associated with the XRCD being closed.
72 .SH "SEE ALSO"
73 .BR ibv_create_srq_ex (3),
74 .BR ibv_create_qp_ex (3),
75 .SH "AUTHORS"
76 .TP
77 Sean Hefty <[email protected]>