iPXE
|
Infiniband multicast groups. More...
#include <stdint.h>
#include <string.h>
#include <byteswap.h>
#include <errno.h>
#include <ipxe/list.h>
#include <ipxe/infiniband.h>
#include <ipxe/ib_mi.h>
#include <ipxe/ib_mcast.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | ib_mcast_mad (struct ib_device *ibdev, struct ib_address_vector *av, unsigned int method, unsigned int mask, union ib_mad *mad) |
Generate multicast membership MAD. More... | |
static void | ib_mcast_complete (struct ib_device *ibdev, struct ib_mad_interface *mi __unused, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *src __unused) |
Handle multicast membership record join response. More... | |
int | ib_mcast_join (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_mc_membership *membership, struct ib_address_vector *av, unsigned int mask, void(*complete)(struct ib_mc_membership *membership, int rc)) |
Join multicast group. More... | |
void | ib_mcast_leave (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_mc_membership *membership) |
Leave multicast group. More... | |
Variables | |
static struct ib_mad_transaction_operations | ib_mcast_op |
Multicast membership management transaction completion operations. More... | |
Infiniband multicast groups.
Definition in file ib_mcast.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Generate multicast membership MAD.
ibdev | Infiniband device |
av | Address vector |
method | Method (IB_MGMT_METHOD_SET or IB_MGMT_METHOD_DELETE) |
mask | Additional component mask |
mad | MAD to fill in |
Definition at line 50 of file ib_mcast.c.
References ib_address_vector::gid, ib_device::gid, htonl, htons, IB_MGMT_CLASS_SUBN_ADM, IB_PKEY_FULL, IB_SA_ATTR_MC_MEMBER_REC, IB_SA_CLASS_VERSION, IB_SA_MCMEMBER_REC_JOIN_STATE, IB_SA_MCMEMBER_REC_MGID, IB_SA_MCMEMBER_REC_PORT_GID, mad, memcpy(), memset(), method, ib_device::pkey, ib_address_vector::qkey, ib_address_vector::rate, ib_mad::sa, sa, and ib_address_vector::sl.
Referenced by ib_mcast_join(), and ib_mcast_leave().
|
static |
Handle multicast membership record join response.
ibdev | Infiniband device |
mi | Management interface |
madx | Management transaction |
rc | Status code |
mad | Received MAD (or NULL on error) |
src | Source address vector (or NULL on error) |
Definition at line 88 of file ib_mcast.c.
References ib_mc_membership::av, ib_mc_membership::complete, DBGC, ENOTCONN, ib_address_vector::gid, ib_mad::hdr, htons, ib_destroy_madx(), IB_GID_ARGS, IB_GID_FMT, ib_madx_get_ownerdata(), IB_MGMT_METHOD_GET_RESP, IB_MGMT_STATUS_OK, ib_modify_qp(), ib_address_vector::lid, mad, ib_mc_membership::madx, ib_sa_data::mc_member_record, mc_member_record, ib_mad_hdr::method, ib_mc_member_record::mlid, ib_device::name, ntohl, ntohs, NULL, out, ib_address_vector::qkey, ib_mc_member_record::qkey, ib_mc_membership::qp, qp, ib_address_vector::rate, ib_mc_member_record::rate_selector__rate, rc, ib_mad::sa, ib_mad_sa::sa_data, ib_address_vector::sl, ib_mc_member_record::sl__flow_label__hop_limit, ib_mad_hdr::status, and strerror().
int ib_mcast_join | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct ib_mc_membership * | membership, | ||
struct ib_address_vector * | av, | ||
unsigned int | mask, | ||
void(*)(struct ib_mc_membership *membership, int rc) | complete | ||
) |
Join multicast group.
ibdev | Infiniband device |
qp | Queue pair |
membership | Multicast group membership |
av | Address vector to fill in |
joined | Join completion handler |
rc | Return status code |
Definition at line 152 of file ib_mcast.c.
References assert(), ib_mc_membership::attached, ib_mc_membership::av, ib_mc_membership::complete, DBGC, ENOMEM, ib_address_vector::gid, ib_device::gsi, ib_create_madx(), ib_destroy_madx(), IB_GID_ARGS, IB_GID_FMT, ib_madx_set_ownerdata(), ib_mcast_attach(), ib_mcast_detach(), ib_mcast_mad(), ib_mcast_op, IB_MGMT_METHOD_SET, mad, ib_mc_membership::madx, ib_device::name, NULL, qp, ib_mc_membership::qp, rc, and strerror().
Referenced by eoib_join_broadcast_group(), and ipoib_join_broadcast_group().
void ib_mcast_leave | ( | struct ib_device * | ibdev, |
struct ib_queue_pair * | qp, | ||
struct ib_mc_membership * | membership | ||
) |
Leave multicast group.
ibdev | Infiniband device |
qp | Queue pair |
membership | Multicast group membership |
Definition at line 209 of file ib_mcast.c.
References assert(), ib_mc_membership::attached, ib_mc_membership::av, DBGC, ib_address_vector::gid, ib_device::gsi, ib_destroy_madx(), IB_GID_ARGS, IB_GID_FMT, ib_mcast_detach(), ib_mcast_mad(), IB_MGMT_METHOD_DELETE, ib_mi_send(), mad, ib_mc_membership::madx, ib_device::name, NULL, qp, rc, and strerror().
Referenced by eoib_leave_broadcast_group(), and ipoib_leave_broadcast_group().
|
static |
Multicast membership management transaction completion operations.
Definition at line 138 of file ib_mcast.c.
Referenced by ib_mcast_join().