Lines Matching refs:mpa

945 	struct mpa_message *mpa;  in send_mpa_req()  local
951 mpalen = sizeof(*mpa) + ep->plen; in send_mpa_req()
975 mpa = (struct mpa_message *)(req + 1); in send_mpa_req()
976 memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); in send_mpa_req()
978 mpa->flags = 0; in send_mpa_req()
980 mpa->flags |= MPA_CRC; in send_mpa_req()
982 mpa->flags |= MPA_MARKERS; in send_mpa_req()
988 mpa->flags |= MPA_ENHANCED_RDMA_CONN; in send_mpa_req()
990 mpa->private_data_size = htons(ep->plen); in send_mpa_req()
991 mpa->revision = mpa_rev_to_use; in send_mpa_req()
998 mpa->private_data_size = in send_mpa_req()
999 htons(ntohs(mpa->private_data_size) + in send_mpa_req()
1015 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_req()
1019 memcpy(mpa->private_data + in send_mpa_req()
1021 ep->mpa_pkt + sizeof(*mpa), ep->plen); in send_mpa_req()
1024 memcpy(mpa->private_data, in send_mpa_req()
1025 ep->mpa_pkt + sizeof(*mpa), ep->plen); in send_mpa_req()
1049 struct mpa_message *mpa; in send_mpa_reject() local
1056 mpalen = sizeof(*mpa) + plen; in send_mpa_reject()
1081 mpa = (struct mpa_message *)(req + 1); in send_mpa_reject()
1082 memset(mpa, 0, sizeof(*mpa)); in send_mpa_reject()
1083 memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); in send_mpa_reject()
1084 mpa->flags = MPA_REJECT; in send_mpa_reject()
1085 mpa->revision = ep->mpa_attr.version; in send_mpa_reject()
1086 mpa->private_data_size = htons(plen); in send_mpa_reject()
1089 mpa->flags |= MPA_ENHANCED_RDMA_CONN; in send_mpa_reject()
1090 mpa->private_data_size = in send_mpa_reject()
1091 htons(ntohs(mpa->private_data_size) + in send_mpa_reject()
1102 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_reject()
1106 memcpy(mpa->private_data + in send_mpa_reject()
1110 memcpy(mpa->private_data, pdata, plen); in send_mpa_reject()
1129 struct mpa_message *mpa; in send_mpa_reply() local
1136 mpalen = sizeof(*mpa) + plen; in send_mpa_reply()
1161 mpa = (struct mpa_message *)(req + 1); in send_mpa_reply()
1162 memset(mpa, 0, sizeof(*mpa)); in send_mpa_reply()
1163 memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); in send_mpa_reply()
1164 mpa->flags = 0; in send_mpa_reply()
1166 mpa->flags |= MPA_CRC; in send_mpa_reply()
1168 mpa->flags |= MPA_MARKERS; in send_mpa_reply()
1169 mpa->revision = ep->mpa_attr.version; in send_mpa_reply()
1170 mpa->private_data_size = htons(plen); in send_mpa_reply()
1173 mpa->flags |= MPA_ENHANCED_RDMA_CONN; in send_mpa_reply()
1174 mpa->private_data_size = in send_mpa_reply()
1175 htons(ntohs(mpa->private_data_size) + in send_mpa_reply()
1191 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_reply()
1195 memcpy(mpa->private_data + in send_mpa_reply()
1199 memcpy(mpa->private_data, pdata, plen); in send_mpa_reply()
1461 struct mpa_message *mpa; in process_mpa_reply() local
1492 if (ep->mpa_pkt_len < sizeof(*mpa)) in process_mpa_reply()
1494 mpa = (struct mpa_message *) ep->mpa_pkt; in process_mpa_reply()
1497 if (mpa->revision > mpa_rev) { in process_mpa_reply()
1499 __func__, mpa_rev, mpa->revision); in process_mpa_reply()
1503 if (memcmp(mpa->key, MPA_KEY_REP, sizeof(mpa->key))) { in process_mpa_reply()
1508 plen = ntohs(mpa->private_data_size); in process_mpa_reply()
1521 if (ep->mpa_pkt_len > (sizeof(*mpa) + plen)) { in process_mpa_reply()
1532 if (ep->mpa_pkt_len < (sizeof(*mpa) + plen)) in process_mpa_reply()
1535 if (mpa->flags & MPA_REJECT) { in process_mpa_reply()
1554 ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) | crc_enabled ? 1 : 0; in process_mpa_reply()
1555 ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0; in process_mpa_reply()
1556 ep->mpa_attr.version = mpa->revision; in process_mpa_reply()
1559 if (mpa->revision == 2) { in process_mpa_reply()
1561 mpa->flags & MPA_ENHANCED_RDMA_CONN ? 1 : 0; in process_mpa_reply()
1564 (ep->mpa_pkt + sizeof(*mpa)); in process_mpa_reply()
1610 } else if (mpa->revision == 1) in process_mpa_reply()
1707 struct mpa_message *mpa; in process_mpa_request() local
1733 if (ep->mpa_pkt_len < sizeof(*mpa)) in process_mpa_request()
1737 mpa = (struct mpa_message *) ep->mpa_pkt; in process_mpa_request()
1742 if (mpa->revision > mpa_rev) { in process_mpa_request()
1744 __func__, mpa_rev, mpa->revision); in process_mpa_request()
1748 if (memcmp(mpa->key, MPA_KEY_REQ, sizeof(mpa->key))) in process_mpa_request()
1751 plen = ntohs(mpa->private_data_size); in process_mpa_request()
1762 if (ep->mpa_pkt_len > (sizeof(*mpa) + plen)) in process_mpa_request()
1769 if (ep->mpa_pkt_len < (sizeof(*mpa) + plen)) in process_mpa_request()
1777 ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) | crc_enabled ? 1 : 0; in process_mpa_request()
1779 ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0; in process_mpa_request()
1780 ep->mpa_attr.version = mpa->revision; in process_mpa_request()
1781 if (mpa->revision == 1) in process_mpa_request()
1785 if (mpa->revision == 2) { in process_mpa_request()
1787 mpa->flags & MPA_ENHANCED_RDMA_CONN ? 1 : 0; in process_mpa_request()
1790 (ep->mpa_pkt + sizeof(*mpa)); in process_mpa_request()
1813 } else if (mpa->revision == 1) in process_mpa_request()