rdma_find_gid_by_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– rdma_find_gid_by_port(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this page is rdma_find_gid_by_port(9) and it's literally the "where's my GID" function, no cap ✨


🌸 NAME 🌸

rdma_find_gid_by_port β€” returns the GID entry attributes when it finds a valid GID entry for the given search parameters. It searches for the specified GID value in the local software cache. πŸŽ€

(like, it doesn't go poke the hardware or anything β€” it checks the cache. very demure, very mindful.)


πŸ¦‹ SYNOPSIS πŸ¦‹

const struct ib_gid_attr * rdma_find_gid_by_port (struct ib_device
*ib_dev , const union ib_gid *gid , enum ib_gid_type gid_type , u32 port
, struct net_device *ndev );

✨ ARGUMENTS ✨

  • ib_dev β€” the device to query. the main character whose cache we're rummaging through πŸ‘‘
  • gid β€” the GID value to search for. this is the thing you're looking for, the whole point of the search πŸ’…
  • gid_type β€” the GID type to search for. gotta match the type too, bestie, we're not sloppy here
  • port β€” the port number of the device where the GID value should be searched. like, which door do we check πŸšͺ
  • ndev β€” in RoCE, the net device of the device. NULL means ignore. so if you're not doing RoCE, just pass NULL and vibe 🫢

πŸ’œ DESCRIPTION πŸ’œ

Returns sgid attributes if the GID is found with valid reference, or returns ERR_PTR for the error. 😭

⚠️ Caveat time, fr fr: the caller must invoke rdma_put_gid_attr to release the reference. this is not optional, this is not a suggestion, this is the rules. you hold a reference, you put it back. periodt. πŸ”₯

🌈 SEE ALSO 🌈


and that's the whole page, bestie! this iconic little entry lives in ./drivers/infiniband/core, it's dated October 2026, and it's the one and only rdma_find_gid_by_port(9). go release those references. mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from