Lines Matching refs:mad
556 static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent)
560 memset(mad, 0, sizeof *mad);
562 mad->mad_hdr.base_version = IB_MGMT_BASE_VERSION;
563 mad->mad_hdr.mgmt_class = IB_MGMT_CLASS_SUBN_ADM;
564 mad->mad_hdr.class_version = IB_SA_CLASS_VERSION;
567 mad->mad_hdr.tid =
615 struct ib_sa_mad *mad)
620 if (mad) {
624 mad->data, &rec);
675 struct ib_sa_mad *mad;
698 mad = query->sa_query.mad_buf->mad;
699 init_mad(mad, agent);
703 mad->mad_hdr.method = IB_MGMT_METHOD_GET;
704 mad->mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_PATH_REC);
705 mad->sa_hdr.comp_mask = comp_mask;
707 ib_pack(path_rec_table, ARRAY_SIZE(path_rec_table), rec, mad->data);
730 struct ib_sa_mad *mad)
735 if (mad) {
739 mad->data, &rec);
792 struct ib_sa_mad *mad;
820 mad = query->sa_query.mad_buf->mad;
821 init_mad(mad, agent);
825 mad->mad_hdr.method = method;
826 mad->mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_SERVICE_REC);
827 mad->sa_hdr.comp_mask = comp_mask;
830 rec, mad->data);
853 struct ib_sa_mad *mad)
858 if (mad) {
862 mad->data, &rec);
889 struct ib_sa_mad *mad;
912 mad = query->sa_query.mad_buf->mad;
913 init_mad(mad, agent);
917 mad->mad_hdr.method = method;
918 mad->mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_MC_MEMBER_REC);
919 mad->sa_hdr.comp_mask = comp_mask;
922 rec, mad->data);
985 mad_recv_wc->recv_buf.mad->mad_hdr.status ?
987 (struct ib_sa_mad *) mad_recv_wc->recv_buf.mad);