ib_init_ah_attr_from_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the struct ib_device * whose ah attributes are getting initialized. it's the main character here, honestly πŸ‘‘
  • port_num β€” a u32, the port on the specified device. 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 fr
  • ah_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 πŸ“:

  1. 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.
  2. 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 invoke rdma_destroy_ah_attr to release the reference to SGID attributes which are initialized using ib_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 🌈

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