Lines Matching refs:req_msg

1004 static void cm_format_req(struct cm_req_msg *req_msg,
1011 cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID,
1014 req_msg->local_comm_id = cm_id_priv->id.local_id;
1015 req_msg->service_id = param->service_id;
1016 req_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
1017 cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num));
1018 cm_req_set_init_depth(req_msg, param->initiator_depth);
1019 cm_req_set_remote_resp_timeout(req_msg,
1021 cm_req_set_qp_type(req_msg, param->qp_type);
1022 cm_req_set_flow_ctrl(req_msg, param->flow_control);
1023 cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn));
1024 cm_req_set_local_resp_timeout(req_msg,
1026 req_msg->pkey = param->primary_path->pkey;
1027 cm_req_set_path_mtu(req_msg, param->primary_path->mtu);
1028 cm_req_set_max_cm_retries(req_msg, param->max_cm_retries);
1031 cm_req_set_resp_res(req_msg, param->responder_resources);
1032 cm_req_set_retry_count(req_msg, param->retry_count);
1033 cm_req_set_rnr_retry_count(req_msg, param->rnr_retry_count);
1034 cm_req_set_srq(req_msg, param->srq);
1038 req_msg->primary_local_lid = pri_path->slid;
1039 req_msg->primary_remote_lid = pri_path->dlid;
1042 req_msg->primary_local_lid = IB_LID_PERMISSIVE;
1043 req_msg->primary_remote_lid = IB_LID_PERMISSIVE;
1045 req_msg->primary_local_gid = pri_path->sgid;
1046 req_msg->primary_remote_gid = pri_path->dgid;
1047 cm_req_set_primary_flow_label(req_msg, pri_path->flow_label);
1048 cm_req_set_primary_packet_rate(req_msg, pri_path->rate);
1049 req_msg->primary_traffic_class = pri_path->traffic_class;
1050 req_msg->primary_hop_limit = pri_path->hop_limit;
1051 cm_req_set_primary_sl(req_msg, pri_path->sl);
1052 cm_req_set_primary_subnet_local(req_msg, (pri_path->hop_limit <= 1));
1053 cm_req_set_primary_local_ack_timeout(req_msg,
1059 req_msg->alt_local_lid = alt_path->slid;
1060 req_msg->alt_remote_lid = alt_path->dlid;
1062 req_msg->alt_local_lid = IB_LID_PERMISSIVE;
1063 req_msg->alt_remote_lid = IB_LID_PERMISSIVE;
1065 req_msg->alt_local_gid = alt_path->sgid;
1066 req_msg->alt_remote_gid = alt_path->dgid;
1067 cm_req_set_alt_flow_label(req_msg,
1069 cm_req_set_alt_packet_rate(req_msg, alt_path->rate);
1070 req_msg->alt_traffic_class = alt_path->traffic_class;
1071 req_msg->alt_hop_limit = alt_path->hop_limit;
1072 cm_req_set_alt_sl(req_msg, alt_path->sl);
1073 cm_req_set_alt_subnet_local(req_msg, (alt_path->hop_limit <= 1));
1074 cm_req_set_alt_local_ack_timeout(req_msg,
1080 memcpy(req_msg->private_data, param->private_data,
1113 struct cm_req_msg *req_msg;
1165 req_msg = (struct cm_req_msg *) cm_id_priv->msg->mad;
1166 cm_format_req(req_msg, cm_id_priv, param);
1167 cm_id_priv->tid = req_msg->hdr.tid;
1171 cm_id_priv->local_qpn = cm_req_get_local_qpn(req_msg);
1172 cm_id_priv->rq_psn = cm_req_get_starting_psn(req_msg);
1235 static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
1240 primary_path->dgid = req_msg->primary_local_gid;
1241 primary_path->sgid = req_msg->primary_remote_gid;
1242 primary_path->dlid = req_msg->primary_local_lid;
1243 primary_path->slid = req_msg->primary_remote_lid;
1244 primary_path->flow_label = cm_req_get_primary_flow_label(req_msg);
1245 primary_path->hop_limit = req_msg->primary_hop_limit;
1246 primary_path->traffic_class = req_msg->primary_traffic_class;
1248 primary_path->pkey = req_msg->pkey;
1249 primary_path->sl = cm_req_get_primary_sl(req_msg);
1251 primary_path->mtu = cm_req_get_path_mtu(req_msg);
1253 primary_path->rate = cm_req_get_primary_packet_rate(req_msg);
1256 cm_req_get_primary_local_ack_timeout(req_msg);
1259 if (req_msg->alt_local_lid) {
1261 alt_path->dgid = req_msg->alt_local_gid;
1262 alt_path->sgid = req_msg->alt_remote_gid;
1263 alt_path->dlid = req_msg->alt_local_lid;
1264 alt_path->slid = req_msg->alt_remote_lid;
1265 alt_path->flow_label = cm_req_get_alt_flow_label(req_msg);
1266 alt_path->hop_limit = req_msg->alt_hop_limit;
1267 alt_path->traffic_class = req_msg->alt_traffic_class;
1269 alt_path->pkey = req_msg->pkey;
1270 alt_path->sl = cm_req_get_alt_sl(req_msg);
1272 alt_path->mtu = cm_req_get_path_mtu(req_msg);
1274 alt_path->rate = cm_req_get_alt_packet_rate(req_msg);
1277 cm_req_get_alt_local_ack_timeout(req_msg);
1286 struct cm_req_msg *req_msg;
1289 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
1294 if (req_msg->alt_local_lid)
1298 param->remote_ca_guid = req_msg->local_ca_guid;
1299 param->remote_qkey = be32_to_cpu(req_msg->local_qkey);
1300 param->remote_qpn = be32_to_cpu(cm_req_get_local_qpn(req_msg));
1301 param->qp_type = cm_req_get_qp_type(req_msg);
1302 param->starting_psn = be32_to_cpu(cm_req_get_starting_psn(req_msg));
1303 param->responder_resources = cm_req_get_init_depth(req_msg);
1304 param->initiator_depth = cm_req_get_resp_res(req_msg);
1306 cm_req_get_remote_resp_timeout(req_msg);
1307 param->flow_control = cm_req_get_flow_ctrl(req_msg);
1309 cm_req_get_local_resp_timeout(req_msg);
1310 param->retry_count = cm_req_get_retry_count(req_msg);
1311 param->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg);
1312 param->srq = cm_req_get_srq(req_msg);
1313 work->cm_event.private_data = &req_msg->private_data;
1443 struct cm_req_msg *req_msg;
1445 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
1474 req_msg->service_id,
1475 req_msg->private_data);
1498 static void cm_process_routed_req(struct cm_req_msg *req_msg, struct ib_wc *wc)
1500 if (!cm_req_get_primary_subnet_local(req_msg)) {
1501 if (req_msg->primary_local_lid == IB_LID_PERMISSIVE) {
1502 req_msg->primary_local_lid = cpu_to_be16(wc->slid);
1503 cm_req_set_primary_sl(req_msg, wc->sl);
1506 if (req_msg->primary_remote_lid == IB_LID_PERMISSIVE)
1507 req_msg->primary_remote_lid = cpu_to_be16(wc->dlid_path_bits);
1510 if (!cm_req_get_alt_subnet_local(req_msg)) {
1511 if (req_msg->alt_local_lid == IB_LID_PERMISSIVE) {
1512 req_msg->alt_local_lid = cpu_to_be16(wc->slid);
1513 cm_req_set_alt_sl(req_msg, wc->sl);
1516 if (req_msg->alt_remote_lid == IB_LID_PERMISSIVE)
1517 req_msg->alt_remote_lid = cpu_to_be16(wc->dlid_path_bits);
1525 struct cm_req_msg *req_msg;
1528 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;
1535 cm_id_priv->id.remote_id = req_msg->local_comm_id;
1545 cm_id_priv->timewait_info->work.remote_id = req_msg->local_comm_id;
1546 cm_id_priv->timewait_info->remote_ca_guid = req_msg->local_ca_guid;
1547 cm_id_priv->timewait_info->remote_qpn = cm_req_get_local_qpn(req_msg);
1558 cm_id_priv->id.service_id = req_msg->service_id;
1561 cm_process_routed_req(req_msg, work->mad_recv_wc->wc);
1562 cm_format_paths_from_req(req_msg, &work->path[0], &work->path[1]);
1575 if (req_msg->alt_local_lid) {
1584 cm_id_priv->tid = req_msg->hdr.tid;
1586 cm_req_get_local_resp_timeout(req_msg));
1587 cm_id_priv->max_cm_retries = cm_req_get_max_cm_retries(req_msg);
1588 cm_id_priv->remote_qpn = cm_req_get_local_qpn(req_msg);
1589 cm_id_priv->initiator_depth = cm_req_get_resp_res(req_msg);
1590 cm_id_priv->responder_resources = cm_req_get_init_depth(req_msg);
1591 cm_id_priv->path_mtu = cm_req_get_path_mtu(req_msg);
1592 cm_id_priv->pkey = req_msg->pkey;
1593 cm_id_priv->sq_psn = cm_req_get_starting_psn(req_msg);
1594 cm_id_priv->retry_count = cm_req_get_retry_count(req_msg);
1595 cm_id_priv->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg);
1596 cm_id_priv->qp_type = cm_req_get_qp_type(req_msg);