.\" -*- nroff -*- .\" .TH IBV_OPEN_XRC_DOMAIN 3 2008-02-10 libibverbs "Libibverbs Programmer's Manual" .SH "NAME" ibv_open_xrc_domain, ibv_close_xrc_domain \- open or close an eXtended Reliable Connection (XRC) domain .SH "SYNOPSIS" .nf .B #include .B #include .sp .BI "struct ibv_xrc_domain *ibv_open_xrc_domain(struct ibv_context " "*context" "," .BI " int " "fd" ", int " "oflag" ); .nl .BI "int ibv_close_xrc_domain(struct ibv_xrc_domain " "*d" ); .fi .SH "DESCRIPTION" .B ibv_open_xrc_domain() open an XRC domain for the InfiniBand device context .I context or return a reference to an opened one\fR. .I fd is the file descriptor to be associated with the XRC domain. The argument .I oflag describes the desired file creation attributes; it is either 0 or the bitwise OR of one or more of the following flags: .PP .TP .B O_CREAT If a domain belonging to device named by context is already associated with the inode, this flag has no effect, except as noted under .BR O_EXCL below. Otherwise, a new XRC domain is created and is associated with inode specified by .IR fd\fR. .TP .B O_EXCL If .BR O_EXCL and .BR O_CREAT are set, open will fail if a domain associated with the inode exists. The check for the existence of the domain and creation of the domain if it does not exist is atomic with respect to other processes executing open with .IR fd naming the same inode. .PP If .I fd equals -1, no inode is is associated with the domain, and the only valid value for .I oflag is .B O_CREAT\fR. .PP .B ibv_close_xrc_domain() closes the XRC domain .I d\fR. If this is the last reference, the XRC domain will be destroyed. .SH "RETURN VALUE" .B ibv_open_xrc_domain() returns a pointer to an opened XRC, or NULL if the request fails. .PP .B ibv_close_xrc_domain() returns 0 on success, or the value of errno on failure (which indicates the failure reason). .SH "NOTES" Not all devices support XRC. To check if a device supports it, check if the .B IBV_DEVICE_XRC bit is set in the device capabilities flags. .PP .B ibv_close_xrc_domain() may fail if any QP or SRQ are still associated with the XRC domain being closed. .SH "SEE ALSO" .BR ibv_create_xrc_srq (3), .BR ibv_create_qp (3), .BR ibv_create_xrc_rcv_qp (3), .BR ibv_modify_xrc_rcv_qp (3), .BR ibv_query_xrc_rcv_qp (3), .BR ibv_reg_xrc_rcv_qp (3) .SH "AUTHORS" .TP Dotan Barak