rdma_find_gid_by_port(9)
π 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 hereportβ 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.NULLmeans ignore. so if you're not doing RoCE, just passNULLand 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 π
- Kernel file
./drivers/infiniband/core/cache.c free_gid_work(9)del_gid(9)add_modify_gid(9)rdma_find_gid_by_filter(9)rdma_query_gid(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)
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
- 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