ib_sa_join_multicast(9)
π¦ ib_sa_join_multicast(9) β the Kernel API Manual page, bestie edition π¦
Okay so picture this: you're in the Kernel API Manual, section 9, and you've just stumbled onto ib_sa_join_multicast. Don't panic π
β this is genuinely one of the more chill ones, and I'm gonna walk you through it like we're texting at 2am.
β¨ SYNOPSIS β¨
struct ib_sa_multicast * ib_sa_join_multicast (struct ib_sa_client
*client , struct ib_device *device , u32 port_num , struct
ib_sa_mcmember_rec *rec , ib_sa_comp_mask comp_mask , gfp_t gfp_mask ,
int (*callback)(int status, struct ib_sa_multicast *multicast) , void
*context );
That's a whole lot of parameters, I know π but lowkey every single one of them has a job. Iconic, honestly.
πΈ ARGUMENTS πΈ
clientβ the SA client. Like, who is doing the asking, y'know?deviceβ the device that's associated with the multicast group π«Άport_numβ which port on that specified device you want tied to the multicast group.recβ the SA multicast member record, aka the thing holding all the group attributes.comp_maskβ the component mask, and no cap this is important: it tells you which of the group attributes inrecare actually valid. vibe check for the record β¨gfp_maskβ the GFP mask used for memory allocations. memory stuff, moving on πcallbackβ your user callback, invoked once the join operation completes. She reports back, periodt.contextβ a user specified context that gets stored right there with theib_sa_multicaststructure. your little souvenir π
π₯ DESCRIPTION π₯
So this call kicks off a multicast join request with the SA for the specified multicast group. That's the whole main character move.
If the join operation is started successfully, it hands you back an ib_sa_multicast structure, and that's your little tracker for the multicast operation. The way that this matters: users must free this structure by calling ib_free_multicast, even if the join operation later fails. Reread that. Yes, even if. The callback status being non-zero does not get you out of your cleanup duties, bestie π
If the join operation fails, status will be non-zero. Free the struct anyway. I said what I said π
When it fails, status comes back non-zero, and here are the failures that are possible:
-ETIMEDOUTβ the request timed out β°-EIOβ an error occurred sending the query π-EINVALβ the MCMemberRecord values differed from the existing group's. mismatch energy, we hate to see it-ENETRESETβ this one means a fatal error has occurred on the multicast group, and the user must rejoin the group to continue using it. not a drill, actual requirement π¨
β SEE ALSO β
- Kernel file
./include/rdma/ib_sa.hstruct sa_path_rec_roce(9) ib_sa_register_client(9)ib_sa_unregister_client(9)ib_init_ah_from_mcmember(9)ib_sa_pack_path(9)ib_sa_pack_service(9)ib_sa_unpack_service(9)ib_sa_unpack_path(9)
Go read them, they're all baddies in their own right π
And that's the page, fr fr π It lives in ./include/rdma, dated October 2026 β so go forth, join that multicast group, free that struct, and slay β¨π¦πΈ
π¦ 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