rdma_find_gid_by_filter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 returns true, the corresponding index is returned; otherwise, we just keep searching the GID table, lowkey persistent energy 🌈. it's guaranteed that while filter is executed, the ndev field is valid and the structure won't change β€” so you're safe, bestie ✨. but filter is executed in an atomic context, and filter must not be NULL. 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 the filter callback constraint is the real one to remember: atomic context, ndev stays valid, and absolutely no NULL filters. bestie we don't do NULL here πŸ™ˆ

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