IBV_CREATE_AH_FROM_WC(3)
π IBV_CREATE_AH_FROM_WC π
okay bestie, so this is the Libibverbs Programmer's Manual and today we're talking about ibv_init_ah_from_wc and ibv_create_ah_from_wc β two lil functions that spin up an address handle (AH) out of a work completion. yes, from a work completion. the way that a whole AH just materializes out of a wc? iconic. π¦
β¨ NAME β¨
ibv_init_ah_from_wc, ibv_create_ah_from_wc β initialize or create an address handle (AH) from a work completion π
β¨ SYNOPSIS β¨
#include <infiniband/verbs.h>
int ibv_init_ah_from_wc(struct ibv_context *context, uint8_t port_num,
struct ibv_wc *wc, struct ibv_grh *grh,
struct ibv_ah_attr *ah_attr);
struct ibv_ah *ibv_create_ah_from_wc(struct ibv_pd *pd,
struct ibv_wc *wc,
struct ibv_grh *grh,
uint8_t port_num);
like, copy that verbatim bestie, don't freestyle the signature π
β¨ DESCRIPTION β¨
π«Ά ibv_init_ah_from_wc()
so this one initializes the address handle (AH) attribute structure ah_attr for the RDMA device context context, using the port number port_num, and it pulls its attributes from the work completion wc plus the Global Routing Header (GRH) structure grh. yes grh, that's the whole vibe. πΈ
π«Ά ibv_create_ah_from_wc()
and this one creates an AH that's associated with the protection domain pd, using the port number port_num, again stealing attributes from the work completion wc and the Global Routing Header (GRH) structure grh. same energy, but it actually hands you a whole AH. ate. π
β¨ RETURN VALUE β¨
ibv_init_ah_from_wc()returns0on success, and-1on error. no in-between, no crumbs. πibv_create_ah_from_wc()returns a pointer to the created AH, orNULLif the request fails. so likeβ¦ vibe check the return value, fr fr.
β¨ NOTES β¨
the filled structure ah_attr that comes back from ibv_init_ah_from_wc() can be used to create a new AH using ibv_create_ah(). so you init here, you create there. teamwork, lowkey. π
not me reminding you to actually keep that ah_attr around if you're gonna use it β it's giving "the whole point". π
β¨ SEE ALSO β¨
go read those too bestie, iykyk π
β¨ AUTHORS β¨
Dotan Barak <dotanba@gmail.com> β thank you for your service π«‘π
libibverbs Β· 2006-10-31 Β· IBV_CREATE_AH_FROM_WC(3)
and that's the page!! dated 2006-10-31, from the libibverbs crew, filed under IBV_CREATE_AH_FROM_WC(3) β slay, bye bestie, go build some address handles π
β¨π¦
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- 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
- 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