rdma_query_gid(9)
β¨ rdma_query_gid(9) β¨
okay so real talk β this is a page out of the Kernel API Manual, bestie, and it's all about rdma_query_gid, which is genuinely one of those little functions that carries the whole squad. it lives in the Linux kernel's RDMA world and it does exactly one thing, but it does it iconically. let's get into it π
πΈ NAME πΈ
rdma_query_gid β read the GID content straight out of the GID software cache π
π¦ SYNOPSIS π¦
int rdma_query_gid (struct ib_device *device , u32 port_num , int index
, union ib_gid *gid );
that's the whole signature, no cap. she takes four things and gives you back an int. β¨
π ARGUMENTS π
deviceβ the device you wanna query the GID from π₯οΈport_numβ the port number on that device, yep, that one πindexβ which GID table entry you're reading, like picking a specific strawberry out of the basket πgidβ a pointer to the GID where the entry's GID gets stored, so it's where the answer lands π―
π DESCRIPTION π
okay so here's the tea: rdma_query_gid only reads the GID entry content for the requested device, port and index. that's it. that's the whole job. she's not doing extra credit, she's not holding onto anything, she just reads and dips π
and the way that she reads for IB, RoCE and iWarp link layers? versatile queen π all three, no problem.
ngl the important bit: it doesn't hold any reference to the GID table entry in the HCA or the software cache. zero attachment, main character energy, in and out. so don't go assuming you've got a reference to hang onto β you do not π
returns 0 on success, or the appropriate error code if things go sideways. simple as that π
π SEE ALSO π
Kernel file ./drivers/infiniband/core/cache.c β plus the whole friend group, fr fr:
free_gid_work(9)del_gid(9)add_modify_gid(9)rdma_find_gid_by_port(9)rdma_find_gid_by_filter(9)rdma_read_gid_hw_context(9)rdma_find_gid(9)rdma_get_gid_attr(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)
they're all in ./drivers/infiniband/core together, a whole little community π«Ά
aaaand that's the page! π this one's brought to you by ./drivers/infiniband/core (the source/version, mwah) and it's dated October 2026 β mark your calendars bestie, slay βπβ¨
π¦ 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