RDMA_JOIN...TICAST_EX(3)

✨ RDMA_JOIN...TICAST_EX(3) ✨

okay bestie, so this is a page from the Librdmacm Programmer's Manual and it's all about rdma_join_multicast_ex, which is literally the ✨extended✨ glow-up version of joining a multicast group. buckle up πŸ’–


🌸 NAME 🌸

rdma_join_multicast_ex β€” joins a multicast group, but make it extended options πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rdma/rdma_cma.h>

int rdma_join_multicast_ex (struct rdma_cm_id *id, struct
rdma_cm_join_mc_attr_ex *mc_join_attr, void *context);

πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” the communication identifier that's linked to this request, iykyk 🫢
  • mc_join_attr β€” an rdma_cm_join_mc_attr_ex struct, exactly as it's defined in <rdma/rdma_cma.h> πŸ“„
  • context β€” your very own user-defined context that rides along with the join request, main character energy fr fr ✨

πŸ’– DESCRIPTION πŸ’–

So basically: this joins a multicast group (MCG) with extended options. Currently it supports MC join with a specified join flag. periodt.

struct rdma_cm_join_mc_attr_ex {
        uint32_t                comp_mask;      /* Bitwise OR between "rdma_cm_join_mc_attr_mask" enum */
        uint32_t                join_flags;     /* Use a single flag from "rdma_cm_mc_join_flags" enum */
        struct sockaddr         *addr;          /* Multicast address identifying the group to join */
};

the supported join flags are, and this part matters bestie, don't skip it πŸ‘‘

  • RDMA_MC_JOIN_FLAG_FULLMEMBER β€” creates the multicast group, sends multicast messages to the MCG, and receives multicast messages from the MCG. the full experience, ate πŸ’…
  • RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER β€” creates the multicast group, sends multicast messages to the MCG, but doesn't receive multicast messages from the MCG (send-only). it's giving one-way street 🚦
Kicking off a MC join as a "Send Only Full Member" on InfiniBand needs SM support, otherwise the join will straight-up fail. no cap. 😭
Kicking off a MC join as a "Send Only Full Member" on RoCEv2/ETH will not send any IGMP messages, unlike a Full Member MC join. And when "Send Only Full Member" is used, the QP will not be attached to the MCG. just so you know 🫢

⭐ RETURN VALUE ⭐

Returns 0 on success, or -1 on error. If an error happens, errno gets set to tell you the failure reason. that's the vibe check 🌈


πŸ”₯ NOTES πŸ”₯

  • Before joining a multicast group, the rdma_cm_id must be bound to an RDMA device by calling rdma_bind_addr or rdma_resolve_addr. non-negotiable, bestie.
  • Using rdma_resolve_addr requires the local routing tables to resolve the multicast address to an RDMA device β€” unless a specific source address is provided.
  • You must call rdma_leave_multicast to leave the multicast group and release any multicast resources. don't just ghost it πŸ™ˆ
  • After the join operation completes, if a QP is associated with the rdma_cm_id, it's automatically attached to the multicast group when the multicast event is retrieved by the user. Otherwise, you're responsible for calling ibv_attach_mcast to bind the QP to the multicast group. your turn, bestie πŸ’ͺ
  • The join context comes back to you through the private_data field in the rdma_cm_event. it's giving little gift 🎁

πŸ‘‘ SEE ALSO πŸ‘‘

rdma_join_multicast(3), rdma_leave_multicast(3), rdma_bind_addr(3), rdma_resolve_addr(3), rdma_create_qp(3), rdma_get_cm_event(3)


πŸ’œ AUTHORS πŸ’œ

Alex Vesker <valex@mellanox.com>


and that's the whole page, bestie πŸŽ€ this one's from librdmacm, dated 2017-11-17 β€” go forth and join those multicast groups responsibly πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from