[infiniband] Allow for the creation of multicast groups
[ipxe.git] / src / include / ipxe / ib_mcast.h
1 #ifndef _IPXE_IB_MCAST_H
2 #define _IPXE_IB_MCAST_H
3
4 /** @file
5 *
6 * Infiniband multicast groups
7 *
8 */
9
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12 #include <ipxe/infiniband.h>
13
14 struct ib_mad_transaction;
15
16 /** An Infiniband multicast group membership */
17 struct ib_mc_membership {
18 /** Queue pair */
19 struct ib_queue_pair *qp;
20 /** Address vector */
21 struct ib_address_vector *av;
22 /** Attached to multicast GID */
23 int attached;
24 /** Multicast group join transaction */
25 struct ib_mad_transaction *madx;
26 /** Handle join success/failure
27 *
28 * @v membership Multicast group membership
29 * @v rc Status code
30 */
31 void ( * complete ) ( struct ib_mc_membership *membership, int rc );
32 };
33
34 extern int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp,
35 struct ib_mc_membership *membership,
36 struct ib_address_vector *av, unsigned int mask,
37 void ( * joined ) ( struct ib_mc_membership *memb,
38 int rc ) );
39
40 extern void ib_mcast_leave ( struct ib_device *ibdev, struct ib_queue_pair *qp,
41 struct ib_mc_membership *membership );
42
43 #endif /* _IPXE_IB_MCAST_H */