add_modify_gid(9)
π« add_modify_gid β a kernel API manual moment π«
okay so bestie, welcome to the Kernel API Manual, and today's main character is add_modify_gid β the little function that handles adding or modifying a GID table entry. yes that's the whole vibe. let's get into it π
β¨ NAME β¨
add_modify_gid β Add or modify GID table entry π¦
πΈ SYNOPSIS πΈ
int add_modify_gid (struct ib_gid_table *table , const struct
ib_gid_attr *attr );
like. look at her. two params, one int return, absolute icon behavior π
π«Ά ARGUMENTS π«Ά
tableβ the GID table where our GID is gonna get added or modified, iykyk πattrβ the attributes of the GID, aka everything you need to know about her β¨
π DESCRIPTION π
so what does she actually do? she returns 0 on success, or an appropriate error code if things go sideways. no cap π
she also accepts zero GID addition for non RoCE ports β specifically for HCA's who report them as valid GID. iconic of them honestly.
π¨ but listen: such zero GIDs are not added to the cache. literally not invited to the party. periodt. π
π SEE ALSO π
bestie you are gonna want the whole friend group, so here's everybody β and yes, they all live in the Kernel file ./drivers/infiniband/core/cache.c:
free_gid_work(9)del_gid(9)rdma_find_gid_by_port(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)
the way that's a whole squad π₯
π and that's the page! this one came from source/version ./drivers/infiniband/core, dated October 2026 β go drink some water and go touch a GID table, love u, 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