1 #ifndef _GPXE_IB_MCAST_H 2 #define _GPXE_IB_MCAST_H 3 4 /** @file 5 * 6 * Infiniband multicast groups 7 * 8 */ 9 10 FILE_LICENCE ( GPL2_OR_LATER ); 11 12 #include <gpxe/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 /** Multicast GID */ 21 struct ib_gid gid; 22 /** Multicast group join transaction */ 23 struct ib_mad_transaction *madx; 24 /** Handle join success/failure 25 * 26 * @v ibdev Infiniband device 27 * @v qp Queue pair 28 * @v membership Multicast group membership 29 * @v rc Status code 30 * @v mad Response MAD (or NULL on error) 31 */ 32 void ( * complete ) ( struct ib_device *ibdev, struct ib_queue_pair *qp, 33 struct ib_mc_membership *membership, int rc, 34 union ib_mad *mad ); 35 }; 36 37 extern int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp, 38 struct ib_mc_membership *membership, 39 struct ib_gid *gid, 40 void ( * joined ) ( struct ib_device *ibdev, 41 struct ib_queue_pair *qp, 42 struct ib_mc_membership *memb, 43 int rc, union ib_mad *mad ) ); 44 45 extern void ib_mcast_leave ( struct ib_device *ibdev, struct ib_queue_pair *qp, 46 struct ib_mc_membership *membership ); 47 48 #endif /* _GPXE_IB_MCAST_H */ 49