rdma_move_grh_sgid_attr(9)
π rdma_move_grh_sgid_attr β a Kernel API Manual moment
okay so bestie, welcome to rdma_move_grh_sgid_attr, from the Kernel API Manual, no cap. This is the function that literally sets the sgid attribute of GRH and takes ownership of the reference while doing it. she's giving main character energy in drivers/infiniband/core/verbs.c and honestly? obsessed. π
β¨ NAME β¨
rdma_move_grh_sgid_attr β Sets the sgid attribute of GRH, taking ownership of the reference π«Ά
πΈ SYNOPSIS πΈ
void rdma_move_grh_sgid_attr (struct rdma_ah_attr *attr , union ib_gid
*dgid , u32 flow_label , u8 hop_limit , u8 traffic_class , const struct
ib_gid_attr *sgid_attr );
like, yes, that's the whole signature, copy it exactly, do not come for me π
π¦ ARGUMENTS π¦
attrβ Pointer to AH attribute structure. this is the address handler attr bestie, she's the moment πdgidβ Destination GID. where we're headed, literally πflow_labelβ Flow label. it's au32, it labels the flow, slay β¨hop_limitβ Hop limit. au8of hop-limiting realness πtraffic_classβ traffic class. lowercase in the original and lowercase in my heart πsgid_attrβ Pointer to SGID attribute. this one isconst struct ib_gid_attr *and she's kind of a big deal π
π₯ DESCRIPTION π₯
okay so here's the tea, and it's important tea: this function takes ownership of the sgid_attr reference. like, it's yours no more, the function has it now π«΄
and because of that, the caller must ensure rdma_destroy_ah_attr is called before destroying the rdma_ah_attr after calling this function. not "should", not "maybe consider", must. no cap. π
bestie please do not skip the rdma_destroy_ah_attr step, i am literally begging π
π SEE ALSO π
Kernel file ./drivers/infiniband/core/verbs.c β and the whole friend group, in the order they showed up: πΈ
__ib_alloc_pd(9)ib_dealloc_pd_user(9)rdma_copy_ah_attr(9)rdma_replace_ah_attr(9)rdma_move_ah_attr(9)rdma_create_ah(9)rdma_create_user_ah(9)rdma_destroy_ah_attr(9)ib_create_srq_user(9)ib_create_qp_user(9)ib_resolve_eth_dmac(9)ib_modify_qp_with_udata(9)ib_alloc_mr(9)ib_alloc_mr_integrity(9)ib_alloc_xrcd_user(9)ib_dealloc_xrcd_user(9)ib_create_wq(9)ib_destroy_wq_user(9)ib_map_mr_sg_pi(9)ib_map_mr_sg(9)ib_sg_to_pages(9)ib_drain_sq(9)ib_drain_rq(9)ib_drain_qp(9)rdma_alloc_hw_stats_struct(9)rdma_free_hw_stats_struct(9)
the whole squad, together, iconic. π§
and that's the page!! π this little gem lives over in ./drivers/infiniband/core and it's dated October 2026, so go forth, move those GRH sgid attrs, take ownership of that reference responsibly, and remember to rdma_destroy_ah_attr first. mwah, 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