52 unsigned int method,
unsigned int mask,
62 sa->sa_hdr.comp_mask[1] =
65 sa->sa_data.mc_member_record.qkey =
htonl ( av->
qkey );
66 sa->sa_data.mc_member_record.pkey =
68 sa->sa_data.mc_member_record.rate_selector__rate = av->
rate;
69 sa->sa_data.mc_member_record.sl__flow_label__hop_limit =
71 sa->sa_data.mc_member_record.scope__join_state = 0x01;
72 memcpy ( &
sa->sa_data.mc_member_record.mgid, &av->
gid,
73 sizeof (
sa->sa_data.mc_member_record.mgid ) );
74 memcpy ( &
sa->sa_data.mc_member_record.port_gid, &ibdev->
gid,
75 sizeof (
sa->sa_data.mc_member_record.port_gid ) );
104 DBGC ( ibdev,
"IBDEV %s QPN %#lx join failed: %s\n",
117 ibdev->
name,
qp->qpn, ( joined ?
"joined" :
"left" ),
123 DBGC ( ibdev,
"IBDEV %s QPN %#lx could not modify qkey: %s\n",
174 DBGC ( ibdev,
"IBDEV %s QPN %#lx could not attach: %s\n",
176 goto err_mcast_attach;
184 if ( ! membership->
madx ) {
185 DBGC ( ibdev,
"IBDEV %s QPN %#lx could not create join " 186 "transaction\n", ibdev->
name,
qp->qpn );
188 goto err_create_madx;
230 if ( membership->
madx ) {
238 DBGC ( ibdev,
"IBDEV %s QPN %#lx could not send leave request: " #define IB_SA_CLASS_VERSION
struct ib_mad_transaction * madx
Multicast group join transaction.
struct arbelprm_rc_send_wqe rc
Infiniband management interfaces.
#define IB_MGMT_METHOD_DELETE
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define IB_SA_ATTR_MC_MEMBER_REC
char name[IBDEV_NAME_LEN]
Name of this Infiniband device.
union ib_gid gid
Port GID (comprising GID prefix and port GUID)
Infiniband multicast groups.
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.
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.
#define IB_PKEY_FULL
Infiniband partition key full membership flag.
int ib_modify_qp(struct ib_device *ibdev, struct ib_queue_pair *qp)
Modify queue pair.
struct ib_address_vector * av
Address vector.
#define IB_SA_MCMEMBER_REC_MGID
int ib_mcast_attach(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Attach to multicast group.
struct ib_mad_interface * gsi
General services interface.
#define IB_MGMT_METHOD_SET
An Infiniband management interface.
int attached
Attached to multicast GID.
uint32_t sl__flow_label__hop_limit
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
unsigned long qkey
Queue key.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
An Infiniband management transaction.
static struct ib_mad_transaction_operations ib_mcast_op
Multicast membership management transaction completion operations.
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.
#define __unused
Declare a variable or data structure as unused.
struct ib_mad_transaction * ib_create_madx(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av, struct ib_mad_transaction_operations *op)
Create management transaction.
static __always_inline void ib_madx_set_ownerdata(struct ib_mad_transaction *madx, void *priv)
Set Infiniband management transaction owner-private data.
An Infiniband multicast group membership.
#define IB_MGMT_METHOD_GET_RESP
#define IB_GID_ARGS(gid)
Infiniband Global Identifier debug message arguments.
#define ENOTCONN
The socket is not connected.
char * strerror(int errno)
Retrieve string representation of error number.
void ib_mcast_detach(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid)
Detach from multicast group.
#define IB_SA_MCMEMBER_REC_JOIN_STATE
static __always_inline void * ib_madx_get_ownerdata(struct ib_mad_transaction *madx)
Get Infiniband management transaction owner-private data.
struct ib_mc_member_record mc_member_record
An Infiniband Queue Pair.
unsigned int sl
Service level.
struct arbelprm_qp_db_record qp
#define IB_MGMT_CLASS_SUBN_ADM
#define IB_MGMT_STATUS_OK
#define IB_SA_MCMEMBER_REC_PORT_GID
struct ib_queue_pair * qp
Queue pair.
union ib_gid gid
GID, if present.
void(* complete)(struct ib_mc_membership *membership, int rc)
Handle join success/failure.
#define IB_GID_FMT
Infiniband Global Identifier debug message format.
struct ib_mc_member_record mc_member_record
uint16_t pkey
Partition key.
An Infiniband Address Vector.
unsigned int lid
Local ID.
void ib_mcast_leave(struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_mc_membership *membership)
Leave multicast group.
void(* complete)(struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *av)
Handle transaction completion.
Infiniband management transaction operations.
#define NULL
NULL pointer (VOID *)
A subnet administration MAD.
uint8_t rate_selector__rate
struct ib_device * ibdev
Infiniband device.
int ib_mi_send(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av)
Transmit MAD.
void ib_destroy_madx(struct ib_device *ibdev __unused, struct ib_mad_interface *mi __unused, struct ib_mad_transaction *madx)
Destroy management transaction.
void * memset(void *dest, int character, size_t len) __nonnull