1IBV_OPEN_XRCD(3) Libibverbs Programmer's Manual IBV_OPEN_XRCD(3)
2
3
4
6 ibv_open_xrcd, ibv_close_xrcd - open or close an XRC protection domain
7 (XRCDs)
8
10 #include <infiniband/verbs.h>
11
12 struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context,
13 struct ibv_xrcd_init_attr *xrcd_init_attr);
14
15 int ibv_close_xrcd(struct ibv_xrcd *xrcd);
16
18 ibv_open_xrcd() open an XRC domain for the RDMA device context context
19 xrcd_init_attr is an ibv_xrcd_init_attr struct, as defined in <infini‐
20 band/verbs.h>.
21
22 struct ibv_xrcd_init_attr {
23 uint32_t comp_mask; /* Identifies valid fields */
24 int fd;
25 int oflag;
26
27 fd is the file descriptor to associate with the XRCD. oflag describes
28 the desired creation attributes. It is a bitwise OR of zero or more of
29 the following flags:
30
31 O_CREAT
32 Indicates that an XRCD should be created and associated with the
33 inode referenced by the given fd. If the XRCD exists, this flag
34 has no effect except as noted under O_EXCL below.
35
36 O_EXCL If O_EXCL and O_CREAT are set, open will fail if an XRCD associ‐
37 ated with the inode exists.
38
39 If fd equals -1, no inode is associated with the XRCD. To indicate that
40 XRCD should be created, use oflag = O_CREAT.
41
42 ibv_close_xrcd() closes the XRCD xrcd. If this is the last reference,
43 the XRCD will be destroyed.
44
46 ibv_open_xrcd() returns a pointer to the opened XRCD, or NULL if the
47 request fails.
48
49 ibv_close_xrcd() returns 0 on success, or the value of errno on failure
50 (which indicates the failure reason).
51
53 ibv_close_xrcd() may fail if any other resource is still associated
54 with the XRCD being closed.
55
57 ibv_create_srq_ex(3), ibv_create_qp_ex(3),
58
60 Sean Hefty <sean.hefty@intel.com>
61
62
63
64libibverbs 2011-06-17 IBV_OPEN_XRCD(3)