Lines Matching defs:mad

82 	struct ib_mad mad;
88 struct ib_mad mad;
221 const struct ib_mad *mad, u16 prev_lid)
231 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
232 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
233 mad->mad_hdr.method == IB_MGMT_METHOD_SET)
234 switch (mad->mad_hdr.attr_id) {
238 pinfo = (struct ib_port_info *) ((struct ib_smp *) mad)->data;
264 bn = be32_to_cpu(((struct ib_smp *)mad)->attr_mod) & 0xFFFF;
265 base = (__be16 *) &(((struct ib_smp *)mad)->data[0]);
300 bn = be32_to_cpu(((struct ib_smp *)mad)->attr_mod);
302 (u8 *)(&((struct ib_smp *)mad)->data));
304 (u8 *)(&((struct ib_smp *)mad)->data));
320 sl2vl64.sl8[jj] = ((struct ib_smp *)mad)->data[jj];
368 struct ib_mad *mad)
372 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
373 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
374 mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP &&
375 mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) {
377 memcpy(((struct ib_smp *) mad)->data, dev->node_desc,
384 const struct ib_mad *mad)
386 int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED;
405 memcpy(send_buf->mad, mad, sizeof *mad);
513 struct ib_grh *grh, struct ib_mad *mad)
615 memcpy(&tun_mad->mad, mad, sizeof *mad);
684 struct ib_mad *mad)
707 if (mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_CM) {
731 if (mlx4_ib_demux_cm_handler(ibdev, port, NULL, mad))
734 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad);
742 /* Initially assume that this mad is for us */
745 /* See if the slave id is encoded in a response mad */
746 if (mad->mad_hdr.method & 0x80) {
747 slave_id = (u8 *) &mad->mad_hdr.tid;
770 switch (mad->mad_hdr.mgmt_class) {
778 if (!(mad->mad_hdr.method & IB_MGMT_METHOD_RESP)) {
779 mlx4_ib_warn(ibdev, "demux QP0. rejecting unsolicited mad for slave %d class 0x%x, method 0x%x\n",
780 slave, mad->mad_hdr.mgmt_class,
781 mad->mad_hdr.method);
788 (struct ib_sa_mad *) mad))
792 if (mlx4_ib_demux_cm_handler(ibdev, port, &slave, mad))
796 if (mad->mad_hdr.method != IB_MGMT_METHOD_GET_RESP)
802 pr_debug("dropping unsupported ingress mad from class:%d "
803 "for slave:%d\n", mad->mad_hdr.mgmt_class, slave);
814 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad);
1359 u8 *s_mac, u16 vlan_id, struct ib_mad *mad)
1424 memcpy(&sqp_mad->payload, mad, sizeof *mad);
1512 switch (tunnel->mad.mad_hdr.method) {
1520 slave_id = (u8 *) &tunnel->mad.mad_hdr.tid;
1522 mlx4_ib_warn(ctx->ib_dev, "egress mad has non-null tid msb:%d "
1524 tunnel->mad.mad_hdr.mgmt_class, slave);
1534 switch (tunnel->mad.mad_hdr.mgmt_class) {
1543 (struct ib_sa_mad *) &tunnel->mad))
1548 (struct ib_mad *) &tunnel->mad))
1552 if (tunnel->mad.mad_hdr.method != IB_MGMT_METHOD_GET &&
1553 tunnel->mad.mad_hdr.method != IB_MGMT_METHOD_SET)
1559 mlx4_ib_warn(ctx->ib_dev, "dropping unsupported egress mad from class:%d "
1560 "for slave:%d\n", tunnel->mad.mad_hdr.mgmt_class, slave);
1565 /* We are using standard ib_core services to send the mad, so generate a
1595 &ah_attr, wc->smac, vlan_id, &tunnel->mad);
1904 struct ib_mad *mad;
1923 mad = (struct ib_mad *) &(((struct mlx4_mad_rcv_buf *)
1929 mlx4_ib_demux_mad(ctx->ib_dev, ctx->port, &wc, grh, mad);