IBV_OPEN_XRCD(3)
π IBV_OPEN_XRCD β bestie, we're opening (and closing) XRC protection domains π
okay so this is from the Libibverbs Programmer's Manual, and we're talking about ibv_open_xrcd and ibv_close_xrcd β the two functions that open or close an XRC protection domain (XRCDs, bestie, say it with me). π¦
β¨ NAME β¨
ibv_open_xrcd, ibv_close_xrcd β open or close an XRC protection domain (XRCDs) π
πΈ SYNOPSIS πΈ
#include <infiniband/verbs.h>
struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context,
struct ibv_xrcd_init_attr *xrcd_init_attr);
int ibv_close_xrcd(struct ibv_xrcd *xrcd);
π DESCRIPTION π
So ibv_open_xrcd() opens an XRC domain for the RDMA device context context. And xrcd_init_attr is an ibv_xrcd_init_attr struct, which is defined in <infiniband/verbs.h>. Iconic. β¨
struct ibv_xrcd_init_attr {
uint32_t comp_mask; /* Identifies valid fields */
int fd;
int oflag;
fd is the file descriptor to associate with the XRCD, no cap. π«Ά And oflag describes the desired creation attributes β it's a bitwise OR of zero or more of these flags, bestie:
O_CREATβ says that an XRCD should be created and associated with the inode referenced by the givenfd. If the XRCD already exists, this flag has no effect except as noted underO_EXCLbelow. (so it's giving "sure, whatever, already got one" energy π)O_EXCLβ ifO_EXCLandO_CREATare both set, open will fail if an XRCD associated with the inode already exists. not the vibe you want, but it's a thing. π
Also important: if fd equals -1, no inode is associated with the XRCD. To indicate that the XRCD should be created, use oflag = O_CREAT. periodt. π
ibv_close_xrcd() closes the XRCD xrcd. And if this is the last reference, the XRCD will be destroyed. rest in peace, queen. π
π RETURN VALUE π
ibv_open_xrcd()returns a pointer to the opened XRCD, orNULLif the request fails. πibv_close_xrcd()returns0on success, or the value oferrnoon failure (which indicates the failure reason). π
β NOTES β
ibv_close_xrcd() may fail if any other resource is still associated with the XRCD being closed. so likeβ¦ make sure everybody's left the party before you lock up. πͺβ¨
π§ SEE ALSO π§
ibv_create_srq_ex(3), ibv_create_qp_ex(3),
π AUTHORS π
Sean Hefty <sean.hefty@intel.com>
and that's the whole page, bestie β go forth and XRCD responsibly π
this lil masterpiece comes to you from libibverbs, dated 2011-06-17, filed under IBV_OPEN_XRCD(3). slay. π β¨
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: libibverbs-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibverbs-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibverbs-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibverbs-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibverbs-dev 56.1-1ubuntu1
- ubuntu resolute: libibverbs-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibverbs-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms