Lines Matching refs:path_rec

2055 	kfree(id_priv->id.route.path_rec);  in _destroy_id()
2274 rt->path_rec = kmalloc_array(rt->num_pri_alt_paths, in cma_ib_new_conn_id()
2275 sizeof(*rt->path_rec), GFP_KERNEL); in cma_ib_new_conn_id()
2276 if (!rt->path_rec) in cma_ib_new_conn_id()
2279 rt->path_rec[0] = *path; in cma_ib_new_conn_id()
2281 rt->path_rec[1] = *ib_event->param.req_rcvd.alternate_path; in cma_ib_new_conn_id()
2289 rdma_addr_set_sgid(&rt->addr.dev_addr, &rt->path_rec[0].sgid); in cma_ib_new_conn_id()
2290 ib_addr_set_pkey(&rt->addr.dev_addr, be16_to_cpu(rt->path_rec[0].pkey)); in cma_ib_new_conn_id()
2297 rdma_addr_set_dgid(&rt->addr.dev_addr, &rt->path_rec[0].dgid); in cma_ib_new_conn_id()
2849 struct sa_path_rec *path_rec) in route_set_path_rec_inbound() argument
2860 *route->path_rec_inbound = *path_rec; in route_set_path_rec_inbound()
2865 struct sa_path_rec *path_rec) in route_set_path_rec_outbound() argument
2876 *route->path_rec_outbound = *path_rec; in route_set_path_rec_outbound()
2880 static void cma_query_handler(int status, struct sa_path_rec *path_rec, in cma_query_handler() argument
2893 if (!path_rec[i].flags || (path_rec[i].flags & IB_PATH_GMP)) in cma_query_handler()
2894 *route->path_rec = path_rec[i]; in cma_query_handler()
2895 else if (path_rec[i].flags & IB_PATH_INBOUND) in cma_query_handler()
2896 status = route_set_path_rec_inbound(work, &path_rec[i]); in cma_query_handler()
2897 else if (path_rec[i].flags & IB_PATH_OUTBOUND) in cma_query_handler()
2899 &path_rec[i]); in cma_query_handler()
2925 struct sa_path_rec path_rec; in cma_query_ib_route() local
2930 memset(&path_rec, 0, sizeof path_rec); in cma_query_ib_route()
2933 path_rec.rec_type = SA_PATH_REC_TYPE_OPA; in cma_query_ib_route()
2935 path_rec.rec_type = SA_PATH_REC_TYPE_IB; in cma_query_ib_route()
2936 rdma_addr_get_sgid(dev_addr, &path_rec.sgid); in cma_query_ib_route()
2937 rdma_addr_get_dgid(dev_addr, &path_rec.dgid); in cma_query_ib_route()
2938 path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(dev_addr)); in cma_query_ib_route()
2939 path_rec.numb_path = 1; in cma_query_ib_route()
2940 path_rec.reversible = 1; in cma_query_ib_route()
2941 path_rec.service_id = rdma_get_service_id(&id_priv->id, in cma_query_ib_route()
2950 path_rec.qos_class = cpu_to_be16((u16) id_priv->tos); in cma_query_ib_route()
2955 path_rec.traffic_class = (u8) (be32_to_cpu(sin6->sin6_flowinfo) >> 20); in cma_query_ib_route()
2960 path_rec.traffic_class = (u8) (be32_to_cpu(sib->sib_flowinfo) >> 20); in cma_query_ib_route()
2966 id_priv->id.port_num, &path_rec, in cma_query_ib_route()
3063 if (!route->path_rec) in cma_resolve_ib_route()
3064 route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL); in cma_resolve_ib_route()
3065 if (!route->path_rec) { in cma_resolve_ib_route()
3076 kfree(route->path_rec); in cma_resolve_ib_route()
3077 route->path_rec = NULL; in cma_resolve_ib_route()
3127 route->path_rec->rec_type = sa_conv_gid_to_pathrec_type(gid_type); in cma_iboe_set_path_rec_l2_fields()
3129 route->path_rec->roce.route_resolved = true; in cma_iboe_set_path_rec_l2_fields()
3130 sa_path_set_dmac(route->path_rec, addr->dev_addr.dst_dev_addr); in cma_iboe_set_path_rec_l2_fields()
3135 struct sa_path_rec *path_rec) in rdma_set_ib_path() argument
3146 id->route.path_rec = kmemdup(path_rec, sizeof(*path_rec), in rdma_set_ib_path()
3148 if (!id->route.path_rec) { in rdma_set_ib_path()
3166 kfree(id->route.path_rec); in rdma_set_ib_path()
3167 id->route.path_rec = NULL; in rdma_set_ib_path()
3289 route->path_rec = kzalloc(sizeof *route->path_rec, GFP_KERNEL); in cma_resolve_iboe_route()
3290 if (!route->path_rec) { in cma_resolve_iboe_route()
3304 &route->path_rec->sgid); in cma_resolve_iboe_route()
3306 &route->path_rec->dgid); in cma_resolve_iboe_route()
3310 route->path_rec->hop_limit = addr->dev_addr.hoplimit; in cma_resolve_iboe_route()
3312 route->path_rec->hop_limit = 1; in cma_resolve_iboe_route()
3313 route->path_rec->reversible = 1; in cma_resolve_iboe_route()
3314 route->path_rec->pkey = cpu_to_be16(0xffff); in cma_resolve_iboe_route()
3315 route->path_rec->mtu_selector = IB_SA_EQ; in cma_resolve_iboe_route()
3316 route->path_rec->sl = iboe_tos_to_sl(ndev, tos); in cma_resolve_iboe_route()
3317 route->path_rec->traffic_class = tos; in cma_resolve_iboe_route()
3318 route->path_rec->mtu = iboe_get_mtu(ndev->mtu); in cma_resolve_iboe_route()
3319 route->path_rec->rate_selector = IB_SA_EQ; in cma_resolve_iboe_route()
3320 route->path_rec->rate = IB_RATE_PORT_CURRENT; in cma_resolve_iboe_route()
3322 route->path_rec->packet_life_time_selector = IB_SA_EQ; in cma_resolve_iboe_route()
3332 route->path_rec->packet_life_time = id_priv->timeout - 1; in cma_resolve_iboe_route()
3334 route->path_rec->packet_life_time = CMA_IBOE_PACKET_LIFETIME; in cma_resolve_iboe_route()
3337 if (!route->path_rec->mtu) { in cma_resolve_iboe_route()
3344 route->path_rec->flow_label = in cma_resolve_iboe_route()
3353 kfree(route->path_rec); in cma_resolve_iboe_route()
3354 route->path_rec = NULL; in cma_resolve_iboe_route()
4226 id_priv->id.route.path_rec, in cma_sidr_rep_handler()
4295 req.path = id_priv->id.route.path_rec; in cma_resolve_ib_udp()
4354 req.primary_path = &route->path_rec[0]; in cma_connect_ib()
4358 req.alternate_path = &route->path_rec[1]; in cma_connect_ib()