Lines Matching defs:mad

209 static int send_mad_to_wire(struct mlx4_ib_demux_ctx *ctx, struct ib_mad *mad)
225 &ah_attr, NULL, 0xffff, mad);
229 struct ib_mad *mad)
249 return mlx4_ib_send_to_slave(dev, slave, ctx->port, IB_QPT_GSI, &wc, NULL, mad);
254 struct ib_sa_mad mad;
255 struct ib_sa_mcmember_data *sa_mad_data = (struct ib_sa_mcmember_data *)&mad.data;
258 /* we rely on a mad request as arrived from a VF */
259 memcpy(&mad, sa_mad, sizeof mad);
265 mad.mad_hdr.tid = mlx4_ib_get_new_demux_tid(group->demux);
266 group->last_req_tid = mad.mad_hdr.tid; /* keep it for later validation */
268 ret = send_mad_to_wire(group->demux, (struct ib_mad *)&mad);
281 struct ib_sa_mad mad;
282 struct ib_sa_mcmember_data *sa_data = (struct ib_sa_mcmember_data *)&mad.data;
285 memset(&mad, 0, sizeof mad);
286 mad.mad_hdr.base_version = 1;
287 mad.mad_hdr.mgmt_class = IB_MGMT_CLASS_SUBN_ADM;
288 mad.mad_hdr.class_version = 2;
289 mad.mad_hdr.method = IB_SA_METHOD_DELETE;
290 mad.mad_hdr.status = cpu_to_be16(0);
291 mad.mad_hdr.class_specific = cpu_to_be16(0);
292 mad.mad_hdr.tid = mlx4_ib_get_new_demux_tid(group->demux);
293 group->last_req_tid = mad.mad_hdr.tid; /* keep it for later validation */
294 mad.mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_MC_MEMBER_REC);
295 mad.mad_hdr.attr_mod = cpu_to_be32(0);
296 mad.sa_hdr.sm_key = 0x0;
297 mad.sa_hdr.attr_offset = cpu_to_be16(7);
298 mad.sa_hdr.comp_mask = IB_SA_MCMEMBER_REC_MGID |
304 ret = send_mad_to_wire(group->demux, (struct ib_mad *)&mad);
321 struct ib_sa_mad mad;
322 struct ib_sa_mcmember_data *sa_data = (struct ib_sa_mcmember_data *)&mad.data;
326 memset(&mad, 0, sizeof mad);
327 mad.mad_hdr.base_version = 1;
328 mad.mad_hdr.mgmt_class = IB_MGMT_CLASS_SUBN_ADM;
329 mad.mad_hdr.class_version = 2;
330 mad.mad_hdr.method = IB_MGMT_METHOD_GET_RESP;
331 mad.mad_hdr.status = cpu_to_be16(status);
332 mad.mad_hdr.class_specific = cpu_to_be16(0);
333 mad.mad_hdr.tid = req_sa_mad->mad_hdr.tid;
334 *(u8 *)&mad.mad_hdr.tid = 0; /* resetting tid to 0 */
335 mad.mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_MC_MEMBER_REC);
336 mad.mad_hdr.attr_mod = cpu_to_be32(0);
337 mad.sa_hdr.sm_key = req_sa_mad->sa_hdr.sm_key;
338 mad.sa_hdr.attr_offset = cpu_to_be16(7);
339 mad.sa_hdr.comp_mask = 0; /* ignored on responses, see IBTA spec */
348 ret = send_mad_to_slave(slave, group->demux, (struct ib_mad *)&mad);
883 struct ib_sa_mad *mad)
886 struct ib_sa_mcmember_data *rec = (struct ib_sa_mcmember_data *)mad->data;
890 switch (mad->mad_hdr.method) {
897 if (mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP) {
898 __be64 tid = mad->mad_hdr.tid;
909 group->response_sa_mad = *mad;
926 port, mad->mad_hdr.method);
1167 struct ib_sa_mad *mad = &req->sa_mad;
1169 mad->mad_hdr.method = IB_SA_METHOD_DELETE;