IBV_ATTACH_MCAST(3)

πŸ’… ibv_attach_mcast(3) β€” like, the libibverbs programmer's manual, but make it make sense

okay bestie, welcome to the ibv_attach_mcast page from the Libibverbs Programmer's Manual. yes you read that right, we're doing multicast group stuff today and honestly? it's giving networking royalty πŸ‘‘


✨ NAME ✨

ibv_attach_mcast, ibv_detach_mcast β€” attach and detach a queue pair (QPs) to/from a multicast group πŸŽ€

(yes, the original really does say "a queue pair (QPs)" β€” we don't gatekeep, we report πŸ’…)


✨ SYNOPSIS ✨

#include <infiniband/verbs.h>

int ibv_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);

int ibv_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);

literally copy that header line exactly, bestie, no typos, #include <infiniband/verbs.h> and you're in πŸ¦‹


✨ DESCRIPTION ✨

ibv_attach_mcast() β€” attaches the QP qp to the multicast group having MGID gid and MLID lid. that's the whole vibe: qp goes in, group gets a new member 🌸

ibv_detach_mcast() β€” detaches the QP qp to the multicast group having MGID gid and MLID lid. (and yes, the original says "detaches ... to" and not "from" β€” we're keeping it 100% as written, ngl 🫢)


✨ RETURN VALUE ✨

both ibv_attach_mcast() and ibv_detach_mcast() return 0 on success πŸ”₯ or, if things go sideways, the value of errno on failure β€” which is literally the universe telling you why it failed, so read it 😭


✨ NOTES ✨

  • only QPs of Transport Service Type IBV_QPT_UD may be attached to multicast groups. that's the dress code, no exceptions πŸŽ€
  • if a QP is attached to the same multicast group multiple times, the QP will still receive a single copy of a multicast message. not me spam-joining and still getting one message πŸ’€ that's the rule.
  • in order to receive multicast messages, a join request for the multicast group must be sent to the subnet administrator (SA), so that the fabric's multicast routing is configured to deliver messages to the local port. iykyk β€” no SA join, no messages, the fabric simply won't know where to send them 🧚
fr fr though: skipping the SA join request means the routing never gets set up, so don't come crying to me when nothing arrives πŸ™ˆ

✨ SEE ALSO ✨


✨ AUTHOR ✨

Dotan Barak <dotanba@gmail.com> πŸ‘‘


kisses, this page was brought to you by libibverbs, dated 2006-10-31 β€” and IBV_ATTACH_MCAST(3) says hi πŸ’œπŸ’…

πŸ“¦ where this page comes from