ib_init_ah_attr_from_path(9)
π ib_init_ah_attr_from_path(9) π
okay bestie, so this one lives in the Kernel API Manual and it's literally the glow-up routine for address handle attributes β like, it takes your SA path record and turns it into ah attributes. it's giving "makeover montage but for kernel structs" β¨
β¨ NAME β¨
ib_init_ah_attr_from_path β initialize address handle attributes based on an SA path record. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
int ib_init_ah_attr_from_path (struct ib_device *device , u32 port_num ,
struct sa_path_rec *rec , struct rdma_ah_attr *ah_attr , const struct
ib_gid_attr *gid_attr );
π¦ ARGUMENTS π¦
deviceβ thestruct ib_device *whose ah attributes are getting initialized. it's the main character here, honestly πport_numβ au32, the port on the specifieddevice. yes you need to say which port, she's not a mind reader πrecβstruct sa_path_rec *, the path record entry you're using to do the ah attributes initialization. this is the raw material fr frah_attrβstruct rdma_ah_attr *, the address handle attributes you're initializing from the path record. this is the one getting the makeover πgid_attrβconst struct ib_gid_attr *, the SGID attribute to consider during initialization. keep an eye on her π
π DESCRIPTION π
so when ib_init_ah_attr_from_path returns success, here's the tea π:
- for IB link layer it optionally contains a reference to the SGID attribute when GRH is present for IB link layer. optionally, bestie β when GRH is there.
- for RoCE link layer it contains a reference to the SGID attribute. no "optionally" here, she's committed.
π¨ listen up, this part matters: the user must invokerdma_destroy_ah_attrto release the reference to SGID attributes which are initialized usingib_init_ah_attr_from_path. like, you can't just leave her on read β clean up your references or it's a memory leak situation and nobody wants that π
π SEE ALSO π
- Kernel file
./drivers/infiniband/core/sa_query.c ib_sa_cancel_query(9)ib_sa_path_rec_get(9)ib_sa_service_rec_get(9)
all of these are your lil study buddies, go read them π π
and that's the whole page, bestie! π«Ά this one's from ./drivers/infiniband/core, dated October 2026, and it's title ib_init_ah_attr_from_path(9) β slay, go initialize some ah attributes responsibly, and don't forget rdma_destroy_ah_attr! πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms