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_UDmay 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
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms