Hal Rosenstock wrote: > On Thu, May 20, 2010 at 6:03 PM, Smith, Stan <[email protected]> > wrote: >> >> Support OSMV_QUERY_MULTIPATH_REC queries. >> >> signed-off-by: stan smith <[email protected]> >> >> --- a/ulp/opensm/user/libvendor/osm_vendor_mlx_sa.c Thu May 20 >> 14:58:29 2010 +++ b/ulp/opensm/user/libvendor/osm_vendor_mlx_sa.c >> Thu May 20 14:41:42 2010 @@ -827,6 +827,46 @@ >> sa_mad_data.p_attr = p_user_query->p_attr; >> break; >> >> +#ifdef DUAL_SIDED_RMPP >> + case OSMV_QUERY_MULTIPATH_REC: >> + OSM_LOG(p_log, OSM_LOG_DEBUG, "DBG:001 >> MULTIPATH_REC\n"); + /* Validate sgid/dgid counts >> against SA client limit */ + p_mpr_req = >> (osmv_multipath_req_t *) p_query_req->p_query_input; + >> if (p_mpr_req->sgid_count + p_mpr_req->dgid_count > + >> IB_MULTIPATH_MAX_GIDS) { + OSM_LOG(p_log, >> OSM_LOG_ERROR, "DBG:001 MULTIPATH_REC " + >> "SGID count %d DGID count %d max count %d\n", + >> p_mpr_req->sgid_count, p_mpr_req->dgid_count, + >> IB_MULTIPATH_MAX_GIDS); + CL_ASSERT(0); >> + return IB_ERROR; >> + } >> + memset(&u.multipath_rec, 0, >> sizeof(ib_multipath_rec_t)); + sa_mad_data.method = >> IB_MAD_METHOD_GETMULTI; + sa_mad_data.attr_id = >> IB_MAD_ATTR_MULTIPATH_RECORD; + >> sa_mad_data.attr_offset = + >> ib_get_attr_offset(sizeof(ib_multipath_rec_t)); + >> sa_mad_data.p_attr = &u.multipath_rec; + >> sa_mad_data.comp_mask = p_mpr_req->comp_mask; + >> u.multipath_rec.num_path = p_mpr_req->num_path; + if >> (p_mpr_req->reversible) + >> u.multipath_rec.num_path |= 0x80; + else + >> u.multipath_rec.num_path &= ~0x80; + >> u.multipath_rec.pkey = p_mpr_req->pkey; + >> ib_multipath_rec_set_sl(&u.multipath_rec, p_mpr_req->sl); + >> ib_multipath_rec_set_qos_class(&u.multipath_rec, 0); + >> u.multipath_rec.independence = p_mpr_req->independence; + >> u.multipath_rec.sgid_count = p_mpr_req->sgid_count; + >> u.multipath_rec.dgid_count = p_mpr_req->dgid_count; + >> j = 0; + for (i = 0; i < p_mpr_req->sgid_count; i++, >> j++) + u.multipath_rec.gids[j] = >> p_mpr_req->gids[j]; + for (i = 0; i < >> p_mpr_req->dgid_count; i++, j++) + >> u.multipath_rec.gids[j] = p_mpr_req->gids[j]; + break; >> +#endif + >> default: >> osm_log(p_log, OSM_LOG_ERROR, >> "osmv_query_sa DBG:001 %s", "UNKNOWN\n"); > > Should this patch also be pushed to Linux > (opensm/libvendor/osm_vendor_mlx_sa.c) ?
I guess so. > > -- Hal > >> _______________________________________________ >> ofw mailing list >> [email protected] >> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
