Lines Matching refs:attrp

82 static ibt_status_t ibcm_validate_path_attributes(ibt_path_attr_t *attrp,
85 static ibt_status_t ibcm_handle_get_path(ibt_path_attr_t *attrp,
105 * attrp Points to an ibt_path_attr_t struct that contains
120 ibt_path_attr_t *attrp, uint8_t max_paths, ibt_path_handler_t func,
124 ibt_hdl, ibtl_cm_get_clnt_name(ibt_hdl), flags, attrp, max_paths,
134 return (ibcm_handle_get_path(attrp, flags, max_paths, NULL, NULL,
142 * ib_gid_t dgid (attrp->pa_dgids[0])
244 ibcm_path_cache_check(ibt_path_flags_t flags, ibt_path_attr_t *attrp,
251 if (max_paths != 1 || attrp->pa_num_dgids != 1 ||
252 attrp->pa_sname != NULL || attrp->pa_sid != 0) {
259 dgid = attrp->pa_dgids[0];
282 path_cachep->attr.pa_dgids = attrp->pa_dgids;
286 memcmp(&(path_cachep->attr), attrp, sizeof (*attrp)) != 0) {
308 ibt_path_attr_t *attrp, uint8_t max_paths, ibt_path_info_t *path)
314 if (max_paths != 1 || attrp->pa_num_dgids != 1 ||
315 attrp->pa_sname != NULL || attrp->pa_sid != 0)
318 dgid = attrp->pa_dgids[0];
325 path_cachep->attr.pa_dgids = attrp->pa_dgids;
329 memcmp(&(path_cachep->attr), attrp, sizeof (*attrp)) == 0) {
343 path_cachep->attr = *attrp;
345 path_cachep->dgid = attrp->pa_dgids[0];
371 * attrp Points to an ibt_path_attr_t struct that contains
393 ibt_path_attr_t *attrp, uint8_t max_paths, ibt_path_info_t *paths,
401 ibt_hdl, ibtl_cm_get_clnt_name(ibt_hdl), flags, attrp, max_paths);
412 if (ibcm_path_cache_check(flags, attrp, max_paths, paths,
416 retval = ibcm_handle_get_path(attrp, flags, max_paths, paths,
420 ibcm_path_cache_add(flags, attrp, max_paths, paths);
426 ibcm_handle_get_path(ibt_path_attr_t *attrp, ibt_path_flags_t flags,
435 retval = ibcm_validate_path_attributes(attrp, flags, max_paths);
439 len = (attrp->pa_num_dgids * sizeof (ib_gid_t)) +
451 bcopy(attrp, &path_tq->attr, sizeof (ibt_path_attr_t));
453 if (attrp->pa_num_dgids) {
457 bcopy(attrp->pa_dgids, path_tq->attr.pa_dgids,
458 sizeof (ib_gid_t) * attrp->pa_num_dgids);
506 ibcm_validate_path_attributes(ibt_path_attr_t *attrp, ibt_path_flags_t flags,
514 attrp->pa_hca_guid, attrp->pa_hca_port_num,
515 attrp->pa_sgid.gid_prefix, attrp->pa_sgid.gid_guid,
516 ((attrp->pa_sname != NULL) ? attrp->pa_sname : ""), attrp->pa_sid,
517 max_paths, flags, attrp->pa_num_dgids, attrp->pa_sd_flags);
541 if ((flags & IBT_PATH_APM) && (attrp->pa_num_dgids > 2)) {
563 if ((flags & IBT_PATH_MULTI_SVC_DEST) && ((attrp->pa_num_dgids > 0) ||
564 ((attrp->pa_sid == 0) && ((attrp->pa_sname == NULL) ||
565 ((attrp->pa_sname != NULL) && (strlen(attrp->pa_sname) == 0)))))) {
580 if ((attrp->pa_sid == 0) && (attrp->pa_num_dgids == 0) &&
581 ((attrp->pa_sname == NULL) || ((attrp->pa_sname != NULL) &&
582 (strlen(attrp->pa_sname) == 0)))) {
590 if (attrp->pa_num_dgids > 0) {
591 if (attrp->pa_dgids == NULL) {
594 attrp->pa_num_dgids);
599 for (i = 0; i < attrp->pa_num_dgids; i++) {
600 ib_gid_t gid = attrp->pa_dgids[i];
625 if ((attrp->pa_sname != NULL) &&
626 (strlen(attrp->pa_sname) >= IB_SVC_NAME_LEN)) {
635 if ((attrp->pa_pkey == IB_PKEY_INVALID_FULL) ||
636 (attrp->pa_pkey & 0x8000) == 0) {
638 "Specified P_Key is invalid: 0x%X", attrp->pa_pkey);
642 "P_Key= 0x%X", attrp->pa_pkey);
1126 ibt_path_attr_t *attrp = &p_arg->attr;
1135 if (attrp->pa_flow) {
1136 pathrec_req.FlowLabel = attrp->pa_flow;
1142 pathrec_req.HopLimit = attrp->pa_hop;
1155 if (attrp->pa_tclass) {
1156 pathrec_req.TClass = attrp->pa_tclass;
1161 if (attrp->pa_sl) {
1162 pathrec_req.SL = attrp->pa_sl;
1175 if (attrp->pa_pkt_lt.p_selector == IBT_BEST) {
1180 if (attrp->pa_srate.r_selector == IBT_BEST) {
1185 if (attrp->pa_mtu.r_selector == IBT_BEST) {
1196 if (attrp->pa_pkt_lt.p_pkt_lt) {
1198 ibt_usec2ib(attrp->pa_pkt_lt.p_pkt_lt);
1200 attrp->pa_pkt_lt.p_selector;
1206 if (attrp->pa_srate.r_srate) {
1207 pathrec_req.Rate = attrp->pa_srate.r_srate;
1208 pathrec_req.RateSelector = attrp->pa_srate.r_selector;
1214 if (attrp->pa_mtu.r_mtu) {
1215 pathrec_req.Mtu = attrp->pa_mtu.r_mtu;
1216 pathrec_req.MtuSelector = attrp->pa_mtu.r_selector;
1390 ibt_path_attr_t *attrp = &p_arg->attr;
1393 attrp, sl, dinfo, *num_path);
1460 if (attrp->pa_flow) {
1461 mpr_req->FlowLabel = attrp->pa_flow;
1467 mpr_req->HopLimit = attrp->pa_hop;
1472 if (attrp->pa_tclass) {
1473 mpr_req->TClass = attrp->pa_tclass;
1478 if (attrp->pa_sl) {
1479 mpr_req->SL = attrp->pa_sl;
1491 if (attrp->pa_pkt_lt.p_selector == IBT_BEST) {
1496 if (attrp->pa_srate.r_selector == IBT_BEST) {
1501 if (attrp->pa_mtu.r_selector == IBT_BEST) {
1512 if (attrp->pa_pkt_lt.p_pkt_lt) {
1514 ibt_usec2ib(attrp->pa_pkt_lt.p_pkt_lt);
1516 attrp->pa_pkt_lt.p_selector;
1523 if (attrp->pa_srate.r_srate) {
1524 mpr_req->Rate = attrp->pa_srate.r_srate;
1525 mpr_req->RateSelector = attrp->pa_srate.r_selector;
1532 if (attrp->pa_mtu.r_mtu) {
1533 mpr_req->Mtu = attrp->pa_mtu.r_mtu;
1534 mpr_req->MtuSelector = attrp->pa_mtu.r_selector;
2030 ibt_path_attr_t *attrp = &p_arg->attr;
2031 uint64_t tmp_sd_flag = attrp->pa_sd_flags;
2039 if ((attrp->pa_sname != NULL) && (strlen(attrp->pa_sname) != 0)) {
2041 attrp->pa_sname, IB_SVC_NAME_LEN);
2047 if (attrp->pa_sid) {
2048 svcrec_req.ServiceID = attrp->pa_sid;
2054 svcrec_req.ServiceP_Key = attrp->pa_pkey;
2059 if (attrp->pa_sd_flags != IBT_NO_SDATA) {
2061 ibcm_swizzle_from_srv(&attrp->pa_sdata, svcrec_req.ServiceData);
2553 * attrp A pointer to an ibt_alt_path_attr_t(9S) structure that
2574 ibt_alt_path_attr_t *attrp, ibt_alt_path_info_t *api_p)
2596 rc_chan, flags, attrp, api_p);
2630 if (attrp) {
2631 new_dgid = attrp->apa_dgid;
2632 new_sgid = attrp->apa_sgid;
2804 if (attrp) {
2805 if (attrp->apa_flow) {
2806 mpr_req->FlowLabel = attrp->apa_flow;
2812 mpr_req->HopLimit = attrp->apa_hop;
2817 if (attrp->apa_tclass) {
2818 mpr_req->TClass = attrp->apa_tclass;
2823 if (attrp->apa_sl) {
2824 mpr_req->SL = attrp->apa_sl;
2835 if (attrp->apa_pkt_lt.p_selector == IBT_BEST) {
2840 if (attrp->apa_srate.r_selector == IBT_BEST) {
2851 if (attrp->apa_pkt_lt.p_pkt_lt) {
2853 ibt_usec2ib(attrp->apa_pkt_lt.p_pkt_lt);
2855 attrp->apa_pkt_lt.p_selector;
2862 if (attrp->apa_srate.r_srate) {
2863 mpr_req->Rate = attrp->apa_srate.r_srate;
2864 mpr_req->RateSelector = attrp->apa_srate.r_selector;
3170 ibt_ip_path_attr_t *attrp = &p_arg->attr;
3179 if (attrp->ipa_flow) {
3180 pathrec_req.FlowLabel = attrp->ipa_flow;
3186 pathrec_req.HopLimit = attrp->ipa_hop;
3191 if (attrp->ipa_tclass) {
3192 pathrec_req.TClass = attrp->ipa_tclass;
3197 if (attrp->ipa_sl) {
3198 pathrec_req.SL = attrp->ipa_sl;
3211 if (attrp->ipa_pkt_lt.p_selector == IBT_BEST) {
3216 if (attrp->ipa_srate.r_selector == IBT_BEST) {
3221 if (attrp->ipa_mtu.r_selector == IBT_BEST) {
3232 if (attrp->ipa_pkt_lt.p_pkt_lt) {
3234 ibt_usec2ib(attrp->ipa_pkt_lt.p_pkt_lt);
3236 attrp->ipa_pkt_lt.p_selector;
3242 if (attrp->ipa_srate.r_srate) {
3243 pathrec_req.Rate = attrp->ipa_srate.r_srate;
3244 pathrec_req.RateSelector = attrp->ipa_srate.r_selector;
3250 if (attrp->ipa_mtu.r_mtu) {
3251 pathrec_req.Mtu = attrp->ipa_mtu.r_mtu;
3252 pathrec_req.MtuSelector = attrp->ipa_mtu.r_selector;
3391 ibt_ip_path_attr_t *attrp = &p_arg->attr;
3394 attrp, sl, dinfo, *num_path);
3454 if (attrp->ipa_flow) {
3455 mpr_req->FlowLabel = attrp->ipa_flow;
3461 mpr_req->HopLimit = attrp->ipa_hop;
3466 if (attrp->ipa_tclass) {
3467 mpr_req->TClass = attrp->ipa_tclass;
3472 if (attrp->ipa_sl) {
3473 mpr_req->SL = attrp->ipa_sl;
3485 if (attrp->ipa_pkt_lt.p_selector == IBT_BEST) {
3490 if (attrp->ipa_srate.r_selector == IBT_BEST) {
3495 if (attrp->ipa_mtu.r_selector == IBT_BEST) {
3506 if (attrp->ipa_pkt_lt.p_pkt_lt) {
3508 ibt_usec2ib(attrp->ipa_pkt_lt.p_pkt_lt);
3510 attrp->ipa_pkt_lt.p_selector;
3517 if (attrp->ipa_srate.r_srate) {
3518 mpr_req->Rate = attrp->ipa_srate.r_srate;
3519 mpr_req->RateSelector = attrp->ipa_srate.r_selector;
3526 if (attrp->ipa_mtu.r_mtu) {
3527 mpr_req->Mtu = attrp->ipa_mtu.r_mtu;
3528 mpr_req->MtuSelector = attrp->ipa_mtu.r_selector;
3990 ibcm_val_ipattr(ibt_ip_path_attr_t *attrp, ibt_path_flags_t flags)
3994 if (attrp == NULL) {
4000 "Maxpath= %d, \n Flags= 0x%X, #Dest %d", attrp->ipa_hca_guid,
4001 attrp->ipa_hca_port_num, attrp->ipa_max_paths, flags,
4002 attrp->ipa_ndst);
4020 if (attrp->ipa_max_paths == 0) {
4022 attrp->ipa_max_paths);
4027 (attrp->ipa_max_paths > IBT_MAX_SPECIAL_PATHS)) {
4035 if ((flags & IBT_PATH_APM) && (attrp->ipa_ndst > 2)) {
4042 if ((attrp->ipa_ndst == 0) || (attrp->ipa_ndst == NULL)) {
4044 "dst_ip %p, ndst %d", attrp->ipa_dst_ip, attrp->ipa_ndst);
4049 IBCM_PRINT_IP("ibcm_val_ipattr SrcIP", &attrp->ipa_src_ip);
4050 if ((attrp->ipa_src_ip.family == AF_INET) &&
4051 (attrp->ipa_src_ip.un.ip4addr == htonl(INADDR_LOOPBACK) ||
4052 attrp->ipa_src_ip.un.ip4addr == INADDR_ANY)) {
4056 } else if ((attrp->ipa_src_ip.family == AF_INET6) &&
4057 (IN6_IS_ADDR_UNSPECIFIED(&attrp->ipa_src_ip.un.ip6addr) ||
4058 IN6_IS_ADDR_LOOPBACK(&attrp->ipa_src_ip.un.ip6addr))) {
4065 (attrp->ipa_src_ip.family == AF_INET6) &&
4066 (IN6_IS_ADDR_LINKLOCAL(&attrp->ipa_src_ip.un.ip6addr))) {
4073 for (i = 0; i < attrp->ipa_ndst; i++) {
4074 ibt_ip_addr_t dst_ip = attrp->ipa_dst_ip[i];
4100 if ((attrp->ipa_src_ip.family != AF_UNSPEC) &&
4101 (attrp->ipa_src_ip.family != dst_ip.family)) {
4104 attrp->ipa_src_ip.family, dst_ip.family);
4115 ibt_ip_path_attr_t *attrp, ibt_path_info_t *paths, uint8_t *num_path_p,
4123 retval = ibcm_val_ipattr(attrp, flags);
4127 len = (attrp->ipa_ndst * sizeof (ibt_ip_addr_t)) +
4137 bcopy(attrp, &path_tq->attr, sizeof (ibt_ip_path_attr_t));
4141 bcopy(attrp->ipa_dst_ip, path_tq->attr.ipa_dst_ip,
4142 sizeof (ibt_ip_addr_t) * attrp->ipa_ndst);
4145 if ((flags & IBT_PATH_AVAIL) && (attrp->ipa_max_paths == 1)) {
4203 ibt_ip_path_attr_t *attrp, ibt_ip_path_handler_t func, void *arg)
4206 ibt_hdl, ibtl_cm_get_clnt_name(ibt_hdl), flags, attrp, func, arg);
4215 return (ibcm_get_ip_path(ibt_hdl, flags, attrp, NULL, NULL,
4222 ibt_ip_path_attr_t *attrp, ibt_path_info_t *paths, uint8_t *num_paths_p,
4226 ibt_hdl, ibtl_cm_get_clnt_name(ibt_hdl), flags, attrp, paths,
4238 return (ibcm_get_ip_path(ibt_hdl, flags, attrp, paths, num_paths_p,
4245 ibt_alt_ip_path_attr_t *attrp, ibt_alt_path_info_t *api_p)
4267 rc_chan, flags, attrp, api_p);
4301 if (attrp) {
4303 retval = ibcm_arp_get_ibaddr(attrp->apa_zoneid,
4304 attrp->apa_src_ip, attrp->apa_dst_ip, &new_sgid,
4481 if (attrp) {
4482 if (attrp->apa_flow) {
4483 mpr_req->FlowLabel = attrp->apa_flow;
4489 mpr_req->HopLimit = attrp->apa_hop;
4494 if (attrp->apa_tclass) {
4495 mpr_req->TClass = attrp->apa_tclass;
4500 if (attrp->apa_sl) {
4501 mpr_req->SL = attrp->apa_sl;
4512 if (attrp->apa_pkt_lt.p_selector == IBT_BEST) {
4517 if (attrp->apa_srate.r_selector == IBT_BEST) {
4528 if (attrp->apa_pkt_lt.p_pkt_lt) {
4530 ibt_usec2ib(attrp->apa_pkt_lt.p_pkt_lt);
4532 attrp->apa_pkt_lt.p_selector;
4539 if (attrp->apa_srate.r_srate) {
4540 mpr_req->Rate = attrp->apa_srate.r_srate;
4541 mpr_req->RateSelector = attrp->apa_srate.r_selector;