rdma_move_grh_sgid_attr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a u32, it labels the flow, slay ✨
  • hop_limit β€” Hop limit. a u8 of hop-limiting realness πŸ‡
  • traffic_class β€” traffic class. lowercase in the original and lowercase in my heart πŸ’–
  • sgid_attr β€” Pointer to SGID attribute. this one is const 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: 🌸

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