rdma_find_gid_by_filter(9)
π rdma_find_gid_by_filter π
okay so bestie, welcome to the rdma_find_gid_by_filter(9) page from your Kernel API Manual β yes it's a kernel manpage and yes we're gonna make it cute, but nothing gets skipped, promise π«Ά
β¨ NAME β¨
rdma_find_gid_by_filter β returns the GID table attribute where a specified GID value occurs, no cap π
πΈ SYNOPSIS πΈ
const struct ib_gid_attr * rdma_find_gid_by_filter (struct ib_device
*ib_dev , const union ib_gid *gid , u32 port , bool (*filter)(const
union ib_gid *gid, const struct ib_gid_attr *, void *) , void *context
);
look at that signature. it's giving "function with a callback" and honestly it ate π₯
π ARGUMENTS π
ib_devβ the device you're querying. like, the main character of the operation πgidβ the GID value you're searching for. that's the whole point fr fr π¦portβ the port number of the device where the GID value could be searched π«filterβ okay so this filter function gets executed on any matching GID in the table. if the filter function returnstrue, the corresponding index is returned; otherwise, we just keep searching the GID table, lowkey persistent energy π. it's guaranteed that whilefilteris executed, thendevfield is valid and the structure won't change β so you're safe, bestie β¨. butfilteris executed in an atomic context, andfiltermust not beNULL. periodt πcontextβ private data to pass into the call-back. a lil gift for your filter function π
π DESCRIPTION π
rdma_find_gid_by_filter searches for the specified GID value of which the filter function returns true in the port's GID table. that's it, that's the vibe check and it passed π§
β SEE ALSO β
kernel file ./drivers/infiniband/core/cache.c and friends:
free_gid_work(9), del_gid(9), add_modify_gid(9), rdma_find_gid_by_port(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)
go read those too, iykyk ππ
ngl thefiltercallback constraint is the real one to remember: atomic context,ndevstays valid, and absolutely noNULLfilters. bestie we don't doNULLhere π
alright that's the whole page β sourced from ./drivers/infiniband/core, dated October 2026, and this lil rdma_find_gid_by_filter(9) era is officially over. slay, bye ππ
β¨
π¦ 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