rdma_get_gid_attr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 rdma_get_gid_attr(9) β€” the Kernel API Manual, bestie edition 🌸

okay so this is a page from the Kernel API Manual (rdma_get_gid_attr(9)), and honestly? it's a little baddie. let's get into it πŸ’…


✨ NAME ✨

rdma_get_gid_attr β€” returns GID attributes for a port of a device at a requested gid_index, if a valid GID entry exists. literally that's her whole job πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

const struct ib_gid_attr * rdma_get_gid_attr (struct ib_device *device ,
u32 port_num , int index );

look at that signature. iconic. no notes πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • device β€” the device you're querying. your main character device, if you will πŸ‘‘
  • port_num β€” the port number on the device where the GID value is gonna be queried. yes bestie, which port πŸ’«
  • index β€” index of the GID table entry whose attributes you're querying. it's giving "entry number, please" πŸ“

🧚 DESCRIPTION 🧚

so what she actually does: rdma_get_gid_attr acquires a reference count of gid attributes from the cached GID table. that's the whole vibe ✨

⚠️ bestie listen to me: the caller must invoke rdma_put_gid_attr to release the reference to the gid attribute, regardless of link layer. no skipping, no "it'll be fine" β€” do not leave her hanging, that's so not slay 😭

she returns a pointer to a valid gid attribute β€” or ERR_PTR for the appropriate error code. so... either you get the goods or you get a little sad pointer-shaped envelope πŸ’Œ


🌈 SEE ALSO 🌈

Kernel file ./drivers/infiniband/core/cache.c β€” and also all of these besties, they're in the group chat too:


and that's the page, periodt 🫢 sign-off time: this one lives over in ./drivers/infiniband/core, dated October 2026, and answers to the name rdma_get_gid_attr(9) β€” mwah πŸ’‹πŸ’œ

πŸ“¦ where this page comes from