> I have a system with many initialized UD queue pairs (info for address handle > creations and qp numbers exchanged out-of-band). I am only using libibverbs > for establishment (purposefully not using librdmacm, to allow for more flexible > environment configuration) — everything is working smoothly for unicast. Now > I would like to create a multicast group and attach some of these queue pairs > (ibv_mcast_attach); however I am struggling to find any details on how to create > such a group (and obtain a proper MGID and MLID). > Hey, I only worked with multicast on Infiniband, and for that I used `saquery -g` to get available configured multicast lids and gids. I guess they were preconfigured in the SM in the rack I used. > 1. What is the role of the OpenSM — is there a C API? > - Are there any examples using opensm programmatically and not with CLI? > - Does the API differ on InfiniBand vs. RoCEv2 fabric? > There is no SM for RoCEv2. You need a SM in IB to get lids of your adapters and configure pkeys and etc. I am not an expert in SM but there are pages explaining how to configure it correctly. Typically, you have one node running SM server or SM is in an IB switch. - Konstantin