rdma_get_gid_attr(9)
πΈ 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:
free_gid_work(9)del_gid(9)add_modify_gid(9)rdma_find_gid_by_port(9)rdma_find_gid_by_filter(9)rdma_query_gid(9)rdma_read_gid_hw_context(9)rdma_find_gid(9)rdma_query_gid_table(9)rdma_put_gid_attr(9)rdma_hold_gid_attr(9)rdma_read_gid_attr_ndev_rcu(9)rdma_read_gid_l2_fields(9)ib_dispatch_event(9)
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
- 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