Lines Matching refs:req_msg
1001 static void cm_format_req(struct cm_req_msg *req_msg, in cm_format_req() argument
1008 cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID, in cm_format_req()
1011 req_msg->local_comm_id = cm_id_priv->id.local_id; in cm_format_req()
1012 req_msg->service_id = param->service_id; in cm_format_req()
1013 req_msg->local_ca_guid = cm_id_priv->id.device->node_guid; in cm_format_req()
1014 cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num)); in cm_format_req()
1015 cm_req_set_init_depth(req_msg, param->initiator_depth); in cm_format_req()
1016 cm_req_set_remote_resp_timeout(req_msg, in cm_format_req()
1018 cm_req_set_qp_type(req_msg, param->qp_type); in cm_format_req()
1019 cm_req_set_flow_ctrl(req_msg, param->flow_control); in cm_format_req()
1020 cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn)); in cm_format_req()
1021 cm_req_set_local_resp_timeout(req_msg, in cm_format_req()
1023 req_msg->pkey = param->primary_path->pkey; in cm_format_req()
1024 cm_req_set_path_mtu(req_msg, param->primary_path->mtu); in cm_format_req()
1025 cm_req_set_max_cm_retries(req_msg, param->max_cm_retries); in cm_format_req()
1028 cm_req_set_resp_res(req_msg, param->responder_resources); in cm_format_req()
1029 cm_req_set_retry_count(req_msg, param->retry_count); in cm_format_req()
1030 cm_req_set_rnr_retry_count(req_msg, param->rnr_retry_count); in cm_format_req()
1031 cm_req_set_srq(req_msg, param->srq); in cm_format_req()
1035 req_msg->primary_local_lid = pri_path->slid; in cm_format_req()
1036 req_msg->primary_remote_lid = pri_path->dlid; in cm_format_req()
1039 req_msg->primary_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1040 req_msg->primary_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1042 req_msg->primary_local_gid = pri_path->sgid; in cm_format_req()
1043 req_msg->primary_remote_gid = pri_path->dgid; in cm_format_req()
1044 cm_req_set_primary_flow_label(req_msg, pri_path->flow_label); in cm_format_req()
1045 cm_req_set_primary_packet_rate(req_msg, pri_path->rate); in cm_format_req()
1046 req_msg->primary_traffic_class = pri_path->traffic_class; in cm_format_req()
1047 req_msg->primary_hop_limit = pri_path->hop_limit; in cm_format_req()
1048 cm_req_set_primary_sl(req_msg, pri_path->sl); in cm_format_req()
1049 cm_req_set_primary_subnet_local(req_msg, (pri_path->hop_limit <= 1)); in cm_format_req()
1050 cm_req_set_primary_local_ack_timeout(req_msg, in cm_format_req()
1056 req_msg->alt_local_lid = alt_path->slid; in cm_format_req()
1057 req_msg->alt_remote_lid = alt_path->dlid; in cm_format_req()
1059 req_msg->alt_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1060 req_msg->alt_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1062 req_msg->alt_local_gid = alt_path->sgid; in cm_format_req()
1063 req_msg->alt_remote_gid = alt_path->dgid; in cm_format_req()
1064 cm_req_set_alt_flow_label(req_msg, in cm_format_req()
1066 cm_req_set_alt_packet_rate(req_msg, alt_path->rate); in cm_format_req()
1067 req_msg->alt_traffic_class = alt_path->traffic_class; in cm_format_req()
1068 req_msg->alt_hop_limit = alt_path->hop_limit; in cm_format_req()
1069 cm_req_set_alt_sl(req_msg, alt_path->sl); in cm_format_req()
1070 cm_req_set_alt_subnet_local(req_msg, (alt_path->hop_limit <= 1)); in cm_format_req()
1071 cm_req_set_alt_local_ack_timeout(req_msg, in cm_format_req()
1077 memcpy(req_msg->private_data, param->private_data, in cm_format_req()
1110 struct cm_req_msg *req_msg; in ib_send_cm_req() local
1162 req_msg = (struct cm_req_msg *) cm_id_priv->msg->mad; in ib_send_cm_req()
1163 cm_format_req(req_msg, cm_id_priv, param); in ib_send_cm_req()
1164 cm_id_priv->tid = req_msg->hdr.tid; in ib_send_cm_req()
1168 cm_id_priv->local_qpn = cm_req_get_local_qpn(req_msg); in ib_send_cm_req()
1169 cm_id_priv->rq_psn = cm_req_get_starting_psn(req_msg); in ib_send_cm_req()
1232 static void cm_format_paths_from_req(struct cm_req_msg *req_msg, in cm_format_paths_from_req() argument
1237 primary_path->dgid = req_msg->primary_local_gid; in cm_format_paths_from_req()
1238 primary_path->sgid = req_msg->primary_remote_gid; in cm_format_paths_from_req()
1239 primary_path->dlid = req_msg->primary_local_lid; in cm_format_paths_from_req()
1240 primary_path->slid = req_msg->primary_remote_lid; in cm_format_paths_from_req()
1241 primary_path->flow_label = cm_req_get_primary_flow_label(req_msg); in cm_format_paths_from_req()
1242 primary_path->hop_limit = req_msg->primary_hop_limit; in cm_format_paths_from_req()
1243 primary_path->traffic_class = req_msg->primary_traffic_class; in cm_format_paths_from_req()
1245 primary_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1246 primary_path->sl = cm_req_get_primary_sl(req_msg); in cm_format_paths_from_req()
1248 primary_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1250 primary_path->rate = cm_req_get_primary_packet_rate(req_msg); in cm_format_paths_from_req()
1253 cm_req_get_primary_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1256 if (req_msg->alt_local_lid) { in cm_format_paths_from_req()
1258 alt_path->dgid = req_msg->alt_local_gid; in cm_format_paths_from_req()
1259 alt_path->sgid = req_msg->alt_remote_gid; in cm_format_paths_from_req()
1260 alt_path->dlid = req_msg->alt_local_lid; in cm_format_paths_from_req()
1261 alt_path->slid = req_msg->alt_remote_lid; in cm_format_paths_from_req()
1262 alt_path->flow_label = cm_req_get_alt_flow_label(req_msg); in cm_format_paths_from_req()
1263 alt_path->hop_limit = req_msg->alt_hop_limit; in cm_format_paths_from_req()
1264 alt_path->traffic_class = req_msg->alt_traffic_class; in cm_format_paths_from_req()
1266 alt_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1267 alt_path->sl = cm_req_get_alt_sl(req_msg); in cm_format_paths_from_req()
1269 alt_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1271 alt_path->rate = cm_req_get_alt_packet_rate(req_msg); in cm_format_paths_from_req()
1274 cm_req_get_alt_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1283 struct cm_req_msg *req_msg; in cm_format_req_event() local
1286 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_format_req_event()
1291 if (req_msg->alt_local_lid) in cm_format_req_event()
1295 param->remote_ca_guid = req_msg->local_ca_guid; in cm_format_req_event()
1296 param->remote_qkey = be32_to_cpu(req_msg->local_qkey); in cm_format_req_event()
1297 param->remote_qpn = be32_to_cpu(cm_req_get_local_qpn(req_msg)); in cm_format_req_event()
1298 param->qp_type = cm_req_get_qp_type(req_msg); in cm_format_req_event()
1299 param->starting_psn = be32_to_cpu(cm_req_get_starting_psn(req_msg)); in cm_format_req_event()
1300 param->responder_resources = cm_req_get_init_depth(req_msg); in cm_format_req_event()
1301 param->initiator_depth = cm_req_get_resp_res(req_msg); in cm_format_req_event()
1303 cm_req_get_remote_resp_timeout(req_msg); in cm_format_req_event()
1304 param->flow_control = cm_req_get_flow_ctrl(req_msg); in cm_format_req_event()
1306 cm_req_get_local_resp_timeout(req_msg); in cm_format_req_event()
1307 param->retry_count = cm_req_get_retry_count(req_msg); in cm_format_req_event()
1308 param->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_format_req_event()
1309 param->srq = cm_req_get_srq(req_msg); in cm_format_req_event()
1310 work->cm_event.private_data = &req_msg->private_data; in cm_format_req_event()
1440 struct cm_req_msg *req_msg; in cm_match_req() local
1442 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_match_req()
1471 req_msg->service_id, in cm_match_req()
1472 req_msg->private_data); in cm_match_req()
1495 static void cm_process_routed_req(struct cm_req_msg *req_msg, struct ib_wc *wc) in cm_process_routed_req() argument
1497 if (!cm_req_get_primary_subnet_local(req_msg)) { in cm_process_routed_req()
1498 if (req_msg->primary_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1499 req_msg->primary_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1500 cm_req_set_primary_sl(req_msg, wc->sl); in cm_process_routed_req()
1503 if (req_msg->primary_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1504 req_msg->primary_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1507 if (!cm_req_get_alt_subnet_local(req_msg)) { in cm_process_routed_req()
1508 if (req_msg->alt_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1509 req_msg->alt_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1510 cm_req_set_alt_sl(req_msg, wc->sl); in cm_process_routed_req()
1513 if (req_msg->alt_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1514 req_msg->alt_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1522 struct cm_req_msg *req_msg; in cm_req_handler() local
1525 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_req_handler()
1532 cm_id_priv->id.remote_id = req_msg->local_comm_id; in cm_req_handler()
1542 cm_id_priv->timewait_info->work.remote_id = req_msg->local_comm_id; in cm_req_handler()
1543 cm_id_priv->timewait_info->remote_ca_guid = req_msg->local_ca_guid; in cm_req_handler()
1544 cm_id_priv->timewait_info->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1555 cm_id_priv->id.service_id = req_msg->service_id; in cm_req_handler()
1558 cm_process_routed_req(req_msg, work->mad_recv_wc->wc); in cm_req_handler()
1559 cm_format_paths_from_req(req_msg, &work->path[0], &work->path[1]); in cm_req_handler()
1569 if (req_msg->alt_local_lid) { in cm_req_handler()
1578 cm_id_priv->tid = req_msg->hdr.tid; in cm_req_handler()
1580 cm_req_get_local_resp_timeout(req_msg)); in cm_req_handler()
1581 cm_id_priv->max_cm_retries = cm_req_get_max_cm_retries(req_msg); in cm_req_handler()
1582 cm_id_priv->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1583 cm_id_priv->initiator_depth = cm_req_get_resp_res(req_msg); in cm_req_handler()
1584 cm_id_priv->responder_resources = cm_req_get_init_depth(req_msg); in cm_req_handler()
1585 cm_id_priv->path_mtu = cm_req_get_path_mtu(req_msg); in cm_req_handler()
1586 cm_id_priv->pkey = req_msg->pkey; in cm_req_handler()
1587 cm_id_priv->sq_psn = cm_req_get_starting_psn(req_msg); in cm_req_handler()
1588 cm_id_priv->retry_count = cm_req_get_retry_count(req_msg); in cm_req_handler()
1589 cm_id_priv->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_req_handler()
1590 cm_id_priv->qp_type = cm_req_get_qp_type(req_msg); in cm_req_handler()