Lines Matching refs:mpa
856 struct mpa_message *mpa; in send_mpa_req() local
863 mpalen = sizeof(*mpa) + ep->plen; in send_mpa_req()
888 mpa = (struct mpa_message *)(req + 1); in send_mpa_req()
889 memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); in send_mpa_req()
890 mpa->flags = (crc_enabled ? MPA_CRC : 0) | in send_mpa_req()
893 mpa->private_data_size = htons(ep->plen); in send_mpa_req()
894 mpa->revision = mpa_rev_to_use; in send_mpa_req()
901 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_req()
917 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_req()
921 memcpy(mpa->private_data + in send_mpa_req()
923 ep->mpa_pkt + sizeof(*mpa), ep->plen); in send_mpa_req()
926 memcpy(mpa->private_data, in send_mpa_req()
927 ep->mpa_pkt + sizeof(*mpa), ep->plen); in send_mpa_req()
950 struct mpa_message *mpa; in send_mpa_reject() local
956 mpalen = sizeof(*mpa) + plen; in send_mpa_reject()
982 mpa = (struct mpa_message *)(req + 1); in send_mpa_reject()
983 memset(mpa, 0, sizeof(*mpa)); in send_mpa_reject()
984 memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); in send_mpa_reject()
985 mpa->flags = MPA_REJECT; in send_mpa_reject()
986 mpa->revision = ep->mpa_attr.version; in send_mpa_reject()
987 mpa->private_data_size = htons(plen); in send_mpa_reject()
990 mpa->flags |= MPA_ENHANCED_RDMA_CONN; in send_mpa_reject()
991 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_reject()
1002 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_reject()
1006 memcpy(mpa->private_data + in send_mpa_reject()
1010 memcpy(mpa->private_data, pdata, plen); in send_mpa_reject()
1030 struct mpa_message *mpa; in send_mpa_reply() local
1036 mpalen = sizeof(*mpa) + plen; in send_mpa_reply()
1062 mpa = (struct mpa_message *)(req + 1); in send_mpa_reply()
1063 memset(mpa, 0, sizeof(*mpa)); in send_mpa_reply()
1064 memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); in send_mpa_reply()
1065 mpa->flags = (ep->mpa_attr.crc_enabled ? MPA_CRC : 0) | in send_mpa_reply()
1067 mpa->revision = ep->mpa_attr.version; in send_mpa_reply()
1068 mpa->private_data_size = htons(plen); in send_mpa_reply()
1071 mpa->flags |= MPA_ENHANCED_RDMA_CONN; in send_mpa_reply()
1072 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_reply()
1088 memcpy(mpa->private_data, &mpa_v2_params, in send_mpa_reply()
1092 memcpy(mpa->private_data + in send_mpa_reply()
1096 memcpy(mpa->private_data, pdata, plen); in send_mpa_reply()
1347 struct mpa_message *mpa; in process_mpa_reply() local
1386 if (ep->mpa_pkt_len < sizeof(*mpa)) in process_mpa_reply()
1388 mpa = (struct mpa_message *) ep->mpa_pkt; in process_mpa_reply()
1391 if (mpa->revision > mpa_rev) { in process_mpa_reply()
1393 " Received = %d\n", __func__, mpa_rev, mpa->revision); in process_mpa_reply()
1397 if (memcmp(mpa->key, MPA_KEY_REP, sizeof(mpa->key))) { in process_mpa_reply()
1402 plen = ntohs(mpa->private_data_size); in process_mpa_reply()
1415 if (ep->mpa_pkt_len > (sizeof(*mpa) + plen)) { in process_mpa_reply()
1426 if (ep->mpa_pkt_len < (sizeof(*mpa) + plen)) in process_mpa_reply()
1429 if (mpa->flags & MPA_REJECT) { in process_mpa_reply()
1440 ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) | crc_enabled ? 1 : 0; in process_mpa_reply()
1442 ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0; in process_mpa_reply()
1443 ep->mpa_attr.version = mpa->revision; in process_mpa_reply()
1446 if (mpa->revision == 2) { in process_mpa_reply()
1448 mpa->flags & MPA_ENHANCED_RDMA_CONN ? 1 : 0; in process_mpa_reply()
1451 (ep->mpa_pkt + sizeof(*mpa)); in process_mpa_reply()
1497 } else if (mpa->revision == 1) in process_mpa_reply()
1583 struct mpa_message *mpa; in process_mpa_request() local
1612 if (ep->mpa_pkt_len < sizeof(*mpa)) in process_mpa_request()
1616 mpa = (struct mpa_message *) ep->mpa_pkt; in process_mpa_request()
1621 if (mpa->revision > mpa_rev) { in process_mpa_request()
1623 " Received = %d\n", __func__, mpa_rev, mpa->revision); in process_mpa_request()
1629 if (memcmp(mpa->key, MPA_KEY_REQ, sizeof(mpa->key))) { in process_mpa_request()
1635 plen = ntohs(mpa->private_data_size); in process_mpa_request()
1649 if (ep->mpa_pkt_len > (sizeof(*mpa) + plen)) { in process_mpa_request()
1659 if (ep->mpa_pkt_len < (sizeof(*mpa) + plen)) in process_mpa_request()
1667 ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) | crc_enabled ? 1 : 0; in process_mpa_request()
1669 ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0; in process_mpa_request()
1670 ep->mpa_attr.version = mpa->revision; in process_mpa_request()
1671 if (mpa->revision == 1) in process_mpa_request()
1675 if (mpa->revision == 2) { in process_mpa_request()
1677 mpa->flags & MPA_ENHANCED_RDMA_CONN ? 1 : 0; in process_mpa_request()
1680 (ep->mpa_pkt + sizeof(*mpa)); in process_mpa_request()
1699 } else if (mpa->revision == 1) in process_mpa_request()