Lines Matching refs:req_msg

1061 static void cm_format_req(struct cm_req_msg *req_msg,  in cm_format_req()  argument
1068 cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID, in cm_format_req()
1071 req_msg->local_comm_id = cm_id_priv->id.local_id; in cm_format_req()
1072 req_msg->service_id = param->service_id; in cm_format_req()
1073 req_msg->local_ca_guid = cm_id_priv->id.device->node_guid; in cm_format_req()
1074 cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num)); in cm_format_req()
1075 cm_req_set_init_depth(req_msg, param->initiator_depth); in cm_format_req()
1076 cm_req_set_remote_resp_timeout(req_msg, in cm_format_req()
1078 cm_req_set_qp_type(req_msg, param->qp_type); in cm_format_req()
1079 cm_req_set_flow_ctrl(req_msg, param->flow_control); in cm_format_req()
1080 cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn)); in cm_format_req()
1081 cm_req_set_local_resp_timeout(req_msg, in cm_format_req()
1083 req_msg->pkey = param->primary_path->pkey; in cm_format_req()
1084 cm_req_set_path_mtu(req_msg, param->primary_path->mtu); in cm_format_req()
1085 cm_req_set_max_cm_retries(req_msg, param->max_cm_retries); in cm_format_req()
1088 cm_req_set_resp_res(req_msg, param->responder_resources); in cm_format_req()
1089 cm_req_set_retry_count(req_msg, param->retry_count); in cm_format_req()
1090 cm_req_set_rnr_retry_count(req_msg, param->rnr_retry_count); in cm_format_req()
1091 cm_req_set_srq(req_msg, param->srq); in cm_format_req()
1095 req_msg->primary_local_lid = pri_path->slid; in cm_format_req()
1096 req_msg->primary_remote_lid = pri_path->dlid; in cm_format_req()
1099 req_msg->primary_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1100 req_msg->primary_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1102 req_msg->primary_local_gid = pri_path->sgid; in cm_format_req()
1103 req_msg->primary_remote_gid = pri_path->dgid; in cm_format_req()
1104 cm_req_set_primary_flow_label(req_msg, pri_path->flow_label); in cm_format_req()
1105 cm_req_set_primary_packet_rate(req_msg, pri_path->rate); in cm_format_req()
1106 req_msg->primary_traffic_class = pri_path->traffic_class; in cm_format_req()
1107 req_msg->primary_hop_limit = pri_path->hop_limit; in cm_format_req()
1108 cm_req_set_primary_sl(req_msg, pri_path->sl); in cm_format_req()
1109 cm_req_set_primary_subnet_local(req_msg, (pri_path->hop_limit <= 1)); in cm_format_req()
1110 cm_req_set_primary_local_ack_timeout(req_msg, in cm_format_req()
1116 req_msg->alt_local_lid = alt_path->slid; in cm_format_req()
1117 req_msg->alt_remote_lid = alt_path->dlid; in cm_format_req()
1119 req_msg->alt_local_lid = IB_LID_PERMISSIVE; in cm_format_req()
1120 req_msg->alt_remote_lid = IB_LID_PERMISSIVE; in cm_format_req()
1122 req_msg->alt_local_gid = alt_path->sgid; in cm_format_req()
1123 req_msg->alt_remote_gid = alt_path->dgid; in cm_format_req()
1124 cm_req_set_alt_flow_label(req_msg, in cm_format_req()
1126 cm_req_set_alt_packet_rate(req_msg, alt_path->rate); in cm_format_req()
1127 req_msg->alt_traffic_class = alt_path->traffic_class; in cm_format_req()
1128 req_msg->alt_hop_limit = alt_path->hop_limit; in cm_format_req()
1129 cm_req_set_alt_sl(req_msg, alt_path->sl); in cm_format_req()
1130 cm_req_set_alt_subnet_local(req_msg, (alt_path->hop_limit <= 1)); in cm_format_req()
1131 cm_req_set_alt_local_ack_timeout(req_msg, in cm_format_req()
1137 memcpy(req_msg->private_data, param->private_data, in cm_format_req()
1170 struct cm_req_msg *req_msg; in ib_send_cm_req() local
1222 req_msg = (struct cm_req_msg *) cm_id_priv->msg->mad; in ib_send_cm_req()
1223 cm_format_req(req_msg, cm_id_priv, param); in ib_send_cm_req()
1224 cm_id_priv->tid = req_msg->hdr.tid; in ib_send_cm_req()
1228 cm_id_priv->local_qpn = cm_req_get_local_qpn(req_msg); in ib_send_cm_req()
1229 cm_id_priv->rq_psn = cm_req_get_starting_psn(req_msg); in ib_send_cm_req()
1292 static void cm_format_paths_from_req(struct cm_req_msg *req_msg, in cm_format_paths_from_req() argument
1297 primary_path->dgid = req_msg->primary_local_gid; in cm_format_paths_from_req()
1298 primary_path->sgid = req_msg->primary_remote_gid; in cm_format_paths_from_req()
1299 primary_path->dlid = req_msg->primary_local_lid; in cm_format_paths_from_req()
1300 primary_path->slid = req_msg->primary_remote_lid; in cm_format_paths_from_req()
1301 primary_path->flow_label = cm_req_get_primary_flow_label(req_msg); in cm_format_paths_from_req()
1302 primary_path->hop_limit = req_msg->primary_hop_limit; in cm_format_paths_from_req()
1303 primary_path->traffic_class = req_msg->primary_traffic_class; in cm_format_paths_from_req()
1305 primary_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1306 primary_path->sl = cm_req_get_primary_sl(req_msg); in cm_format_paths_from_req()
1308 primary_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1310 primary_path->rate = cm_req_get_primary_packet_rate(req_msg); in cm_format_paths_from_req()
1313 cm_req_get_primary_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1315 primary_path->service_id = req_msg->service_id; in cm_format_paths_from_req()
1317 if (req_msg->alt_local_lid) { in cm_format_paths_from_req()
1319 alt_path->dgid = req_msg->alt_local_gid; in cm_format_paths_from_req()
1320 alt_path->sgid = req_msg->alt_remote_gid; in cm_format_paths_from_req()
1321 alt_path->dlid = req_msg->alt_local_lid; in cm_format_paths_from_req()
1322 alt_path->slid = req_msg->alt_remote_lid; in cm_format_paths_from_req()
1323 alt_path->flow_label = cm_req_get_alt_flow_label(req_msg); in cm_format_paths_from_req()
1324 alt_path->hop_limit = req_msg->alt_hop_limit; in cm_format_paths_from_req()
1325 alt_path->traffic_class = req_msg->alt_traffic_class; in cm_format_paths_from_req()
1327 alt_path->pkey = req_msg->pkey; in cm_format_paths_from_req()
1328 alt_path->sl = cm_req_get_alt_sl(req_msg); in cm_format_paths_from_req()
1330 alt_path->mtu = cm_req_get_path_mtu(req_msg); in cm_format_paths_from_req()
1332 alt_path->rate = cm_req_get_alt_packet_rate(req_msg); in cm_format_paths_from_req()
1335 cm_req_get_alt_local_ack_timeout(req_msg); in cm_format_paths_from_req()
1337 alt_path->service_id = req_msg->service_id; in cm_format_paths_from_req()
1363 struct cm_req_msg *req_msg; in cm_format_req_event() local
1366 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_format_req_event()
1372 if (req_msg->alt_local_lid) in cm_format_req_event()
1376 param->remote_ca_guid = req_msg->local_ca_guid; in cm_format_req_event()
1377 param->remote_qkey = be32_to_cpu(req_msg->local_qkey); in cm_format_req_event()
1378 param->remote_qpn = be32_to_cpu(cm_req_get_local_qpn(req_msg)); in cm_format_req_event()
1379 param->qp_type = cm_req_get_qp_type(req_msg); in cm_format_req_event()
1380 param->starting_psn = be32_to_cpu(cm_req_get_starting_psn(req_msg)); in cm_format_req_event()
1381 param->responder_resources = cm_req_get_init_depth(req_msg); in cm_format_req_event()
1382 param->initiator_depth = cm_req_get_resp_res(req_msg); in cm_format_req_event()
1384 cm_req_get_remote_resp_timeout(req_msg); in cm_format_req_event()
1385 param->flow_control = cm_req_get_flow_ctrl(req_msg); in cm_format_req_event()
1387 cm_req_get_local_resp_timeout(req_msg); in cm_format_req_event()
1388 param->retry_count = cm_req_get_retry_count(req_msg); in cm_format_req_event()
1389 param->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_format_req_event()
1390 param->srq = cm_req_get_srq(req_msg); in cm_format_req_event()
1391 work->cm_event.private_data = &req_msg->private_data; in cm_format_req_event()
1521 struct cm_req_msg *req_msg; in cm_match_req() local
1523 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_match_req()
1552 req_msg->service_id); in cm_match_req()
1575 static void cm_process_routed_req(struct cm_req_msg *req_msg, struct ib_wc *wc) in cm_process_routed_req() argument
1577 if (!cm_req_get_primary_subnet_local(req_msg)) { in cm_process_routed_req()
1578 if (req_msg->primary_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1579 req_msg->primary_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1580 cm_req_set_primary_sl(req_msg, wc->sl); in cm_process_routed_req()
1583 if (req_msg->primary_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1584 req_msg->primary_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1587 if (!cm_req_get_alt_subnet_local(req_msg)) { in cm_process_routed_req()
1588 if (req_msg->alt_local_lid == IB_LID_PERMISSIVE) { in cm_process_routed_req()
1589 req_msg->alt_local_lid = cpu_to_be16(wc->slid); in cm_process_routed_req()
1590 cm_req_set_alt_sl(req_msg, wc->sl); in cm_process_routed_req()
1593 if (req_msg->alt_remote_lid == IB_LID_PERMISSIVE) in cm_process_routed_req()
1594 req_msg->alt_remote_lid = cpu_to_be16(wc->dlid_path_bits); in cm_process_routed_req()
1602 struct cm_req_msg *req_msg; in cm_req_handler() local
1605 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_req_handler()
1612 cm_id_priv->id.remote_id = req_msg->local_comm_id; in cm_req_handler()
1622 cm_id_priv->timewait_info->work.remote_id = req_msg->local_comm_id; in cm_req_handler()
1623 cm_id_priv->timewait_info->remote_ca_guid = req_msg->local_ca_guid; in cm_req_handler()
1624 cm_id_priv->timewait_info->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1635 cm_id_priv->id.service_id = req_msg->service_id; in cm_req_handler()
1638 cm_process_routed_req(req_msg, work->mad_recv_wc->wc); in cm_req_handler()
1639 cm_format_paths_from_req(req_msg, &work->path[0], &work->path[1]); in cm_req_handler()
1652 if (req_msg->alt_local_lid) { in cm_req_handler()
1661 cm_id_priv->tid = req_msg->hdr.tid; in cm_req_handler()
1663 cm_req_get_local_resp_timeout(req_msg)); in cm_req_handler()
1664 cm_id_priv->max_cm_retries = cm_req_get_max_cm_retries(req_msg); in cm_req_handler()
1665 cm_id_priv->remote_qpn = cm_req_get_local_qpn(req_msg); in cm_req_handler()
1666 cm_id_priv->initiator_depth = cm_req_get_resp_res(req_msg); in cm_req_handler()
1667 cm_id_priv->responder_resources = cm_req_get_init_depth(req_msg); in cm_req_handler()
1668 cm_id_priv->path_mtu = cm_req_get_path_mtu(req_msg); in cm_req_handler()
1669 cm_id_priv->pkey = req_msg->pkey; in cm_req_handler()
1670 cm_id_priv->sq_psn = cm_req_get_starting_psn(req_msg); in cm_req_handler()
1671 cm_id_priv->retry_count = cm_req_get_retry_count(req_msg); in cm_req_handler()
1672 cm_id_priv->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg); in cm_req_handler()
1673 cm_id_priv->qp_type = cm_req_get_qp_type(req_msg); in cm_req_handler()