rdma_query_gid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

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