Lines Matching refs:req_msg
1008 static void cm_format_req(struct cm_req_msg *req_msg, in cm_format_req() argument
1015 cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID, in cm_format_req()
1018 req_msg->local_comm_id = cm_id_priv->id.local_id; in cm_format_req()
1019 req_msg->service_id = param->service_id; in cm_format_req()
1020 req_msg->local_ca_guid = cm_id_priv->id.device->node_guid; in cm_format_req()
1021 cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num)); in cm_format_req()
1022 cm_req_set_init_depth(req_msg, param->initiator_depth); in cm_format_req()
1023 cm_req_set_remote_resp_timeout(req_msg, in cm_format_req()
1025 cm_req_set_qp_type(req_msg, param->qp_type); in cm_format_req()
1026 cm_req_set_flow_ctrl(req_msg, param->flow_control); in cm_format_req()
1027 cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn)); in cm_format_req()
1028 cm_req_set_local_resp_timeout(req_msg, in cm_format_req()
1030 req_msg->pkey = param->primary_path->pkey; in cm_format_req()
1031 cm_req_set_path_mtu(req_msg, param->primary_path->mtu); in cm_format_req()
1032 cm_req_set_max_cm_retries(req_msg, param->max_cm_retries); in cm_format_req()
1035 cm_req_set_resp_res(req_msg, param->responder_resources); in cm_format_req()
1036 cm_req_set_retry_count(req_msg, param->retry_count); in cm_format_req()
1037 cm_req_set_rnr_retry_count(req_msg, param->rnr_retry_count); in cm_format_req()
1038 cm_req_set_srq(req_msg, param->srq); in cm_format_req()
1042 req_msg->primary_local_lid = pri_path->slid; in cm_format_req()
1043 req_msg->primary_remote_lid = pri_path->dlid; in cm_format_req()
1046 req_msg->primary_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1047 req_msg->primary_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1049 req_msg->primary_local_gid = pri_path->sgid; in cm_format_req()
1050 req_msg->primary_remote_gid = pri_path->dgid; in cm_format_req()
1051 cm_req_set_primary_flow_label(req_msg, pri_path->flow_label); in cm_format_req()
1052 cm_req_set_primary_packet_rate(req_msg, pri_path->rate); in cm_format_req()
1053 req_msg->primary_traffic_class = pri_path->traffic_class; in cm_format_req()
1054 req_msg->primary_hop_limit = pri_path->hop_limit; in cm_format_req()
1055 cm_req_set_primary_sl(req_msg, pri_path->sl); in cm_format_req()
1056 cm_req_set_primary_subnet_local(req_msg, (pri_path->hop_limit <= 1)); in cm_format_req()
1057 cm_req_set_primary_local_ack_timeout(req_msg, in cm_format_req()
1063 req_msg->alt_local_lid = alt_path->slid; in cm_format_req()
1064 req_msg->alt_remote_lid = alt_path->dlid; in cm_format_req()
1066 req_msg->alt_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1067 req_msg->alt_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1069 req_msg->alt_local_gid = alt_path->sgid; in cm_format_req()
1070 req_msg->alt_remote_gid = alt_path->dgid; in cm_format_req()
1071 cm_req_set_alt_flow_label(req_msg, in cm_format_req()
1073 cm_req_set_alt_packet_rate(req_msg, alt_path->rate); in cm_format_req()
1074 req_msg->alt_traffic_class = alt_path->traffic_class; in cm_format_req()
1075 req_msg->alt_hop_limit = alt_path->hop_limit; in cm_format_req()
1076 cm_req_set_alt_sl(req_msg, alt_path->sl); in cm_format_req()
1077 cm_req_set_alt_subnet_local(req_msg, (alt_path->hop_limit <= 1)); in cm_format_req()
1078 cm_req_set_alt_local_ack_timeout(req_msg, in cm_format_req()
1084 memcpy(req_msg->private_data, param->private_data, in cm_format_req()
1117 struct cm_req_msg *req_msg; in ib_send_cm_req() local
1169 req_msg = (struct cm_req_msg *) cm_id_priv->msg->mad; in ib_send_cm_req()
1170 cm_format_req(req_msg, cm_id_priv, param); in ib_send_cm_req()
1171 cm_id_priv->tid = req_msg->hdr.tid; in ib_send_cm_req()
1175 cm_id_priv->local_qpn = cm_req_get_local_qpn(req_msg); in ib_send_cm_req()
1176 cm_id_priv->rq_psn = cm_req_get_starting_psn(req_msg); in ib_send_cm_req()
1239 static void cm_format_paths_from_req(struct cm_req_msg *req_msg, in cm_format_paths_from_req() argument
1244 primary_path->dgid = req_msg->primary_local_gid; in cm_format_paths_from_req()
1245 primary_path->sgid = req_msg->primary_remote_gid; in cm_format_paths_from_req()
1246 primary_path->dlid = req_msg->primary_local_lid; in cm_format_paths_from_req()
1247 primary_path->slid = req_msg->primary_remote_lid; in cm_format_paths_from_req()
1248 primary_path->flow_label = cm_req_get_primary_flow_label(req_msg); in cm_format_paths_from_req()
1249 primary_path->hop_limit = req_msg->primary_hop_limit; in cm_format_paths_from_req()
1250 primary_path->traffic_class = req_msg->primary_traffic_class; in cm_format_paths_from_req()
1252 primary_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1253 primary_path->sl = cm_req_get_primary_sl(req_msg); in cm_format_paths_from_req()
1255 primary_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1257 primary_path->rate = cm_req_get_primary_packet_rate(req_msg); in cm_format_paths_from_req()
1260 cm_req_get_primary_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1263 if (req_msg->alt_local_lid) { in cm_format_paths_from_req()
1265 alt_path->dgid = req_msg->alt_local_gid; in cm_format_paths_from_req()
1266 alt_path->sgid = req_msg->alt_remote_gid; in cm_format_paths_from_req()
1267 alt_path->dlid = req_msg->alt_local_lid; in cm_format_paths_from_req()
1268 alt_path->slid = req_msg->alt_remote_lid; in cm_format_paths_from_req()
1269 alt_path->flow_label = cm_req_get_alt_flow_label(req_msg); in cm_format_paths_from_req()
1270 alt_path->hop_limit = req_msg->alt_hop_limit; in cm_format_paths_from_req()
1271 alt_path->traffic_class = req_msg->alt_traffic_class; in cm_format_paths_from_req()
1273 alt_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1274 alt_path->sl = cm_req_get_alt_sl(req_msg); in cm_format_paths_from_req()
1276 alt_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1278 alt_path->rate = cm_req_get_alt_packet_rate(req_msg); in cm_format_paths_from_req()
1281 cm_req_get_alt_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1290 struct cm_req_msg *req_msg; in cm_format_req_event() local
1293 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_format_req_event()
1298 if (req_msg->alt_local_lid) in cm_format_req_event()
1302 param->remote_ca_guid = req_msg->local_ca_guid; in cm_format_req_event()
1303 param->remote_qkey = be32_to_cpu(req_msg->local_qkey); in cm_format_req_event()
1304 param->remote_qpn = be32_to_cpu(cm_req_get_local_qpn(req_msg)); in cm_format_req_event()
1305 param->qp_type = cm_req_get_qp_type(req_msg); in cm_format_req_event()
1306 param->starting_psn = be32_to_cpu(cm_req_get_starting_psn(req_msg)); in cm_format_req_event()
1307 param->responder_resources = cm_req_get_init_depth(req_msg); in cm_format_req_event()
1308 param->initiator_depth = cm_req_get_resp_res(req_msg); in cm_format_req_event()
1310 cm_req_get_remote_resp_timeout(req_msg); in cm_format_req_event()
1311 param->flow_control = cm_req_get_flow_ctrl(req_msg); in cm_format_req_event()
1313 cm_req_get_local_resp_timeout(req_msg); in cm_format_req_event()
1314 param->retry_count = cm_req_get_retry_count(req_msg); in cm_format_req_event()
1315 param->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_format_req_event()
1316 param->srq = cm_req_get_srq(req_msg); in cm_format_req_event()
1317 work->cm_event.private_data = &req_msg->private_data; in cm_format_req_event()
1447 struct cm_req_msg *req_msg; in cm_match_req() local
1449 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_match_req()
1478 req_msg->service_id, in cm_match_req()
1479 req_msg->private_data); in cm_match_req()
1502 static void cm_process_routed_req(struct cm_req_msg *req_msg, struct ib_wc *wc) in cm_process_routed_req() argument
1504 if (!cm_req_get_primary_subnet_local(req_msg)) { in cm_process_routed_req()
1505 if (req_msg->primary_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1506 req_msg->primary_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1507 cm_req_set_primary_sl(req_msg, wc->sl); in cm_process_routed_req()
1510 if (req_msg->primary_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1511 req_msg->primary_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1514 if (!cm_req_get_alt_subnet_local(req_msg)) { in cm_process_routed_req()
1515 if (req_msg->alt_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1516 req_msg->alt_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1517 cm_req_set_alt_sl(req_msg, wc->sl); in cm_process_routed_req()
1520 if (req_msg->alt_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1521 req_msg->alt_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1529 struct cm_req_msg *req_msg; in cm_req_handler() local
1532 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_req_handler()
1539 cm_id_priv->id.remote_id = req_msg->local_comm_id; in cm_req_handler()
1549 cm_id_priv->timewait_info->work.remote_id = req_msg->local_comm_id; in cm_req_handler()
1550 cm_id_priv->timewait_info->remote_ca_guid = req_msg->local_ca_guid; in cm_req_handler()
1551 cm_id_priv->timewait_info->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1562 cm_id_priv->id.service_id = req_msg->service_id; in cm_req_handler()
1565 cm_process_routed_req(req_msg, work->mad_recv_wc->wc); in cm_req_handler()
1566 cm_format_paths_from_req(req_msg, &work->path[0], &work->path[1]); in cm_req_handler()
1579 if (req_msg->alt_local_lid) { in cm_req_handler()
1588 cm_id_priv->tid = req_msg->hdr.tid; in cm_req_handler()
1590 cm_req_get_local_resp_timeout(req_msg)); in cm_req_handler()
1591 cm_id_priv->max_cm_retries = cm_req_get_max_cm_retries(req_msg); in cm_req_handler()
1592 cm_id_priv->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1593 cm_id_priv->initiator_depth = cm_req_get_resp_res(req_msg); in cm_req_handler()
1594 cm_id_priv->responder_resources = cm_req_get_init_depth(req_msg); in cm_req_handler()
1595 cm_id_priv->path_mtu = cm_req_get_path_mtu(req_msg); in cm_req_handler()
1596 cm_id_priv->pkey = req_msg->pkey; in cm_req_handler()
1597 cm_id_priv->sq_psn = cm_req_get_starting_psn(req_msg); in cm_req_handler()
1598 cm_id_priv->retry_count = cm_req_get_retry_count(req_msg); in cm_req_handler()
1599 cm_id_priv->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_req_handler()
1600 cm_id_priv->qp_type = cm_req_get_qp_type(req_msg); in cm_req_handler()