Lines Matching refs:mpa
258 kfree(cep->mpa.pdata); in __siw_cep_dealloc()
338 u16 pd_len = be16_to_cpu(cep->mpa.hdr.params.pd_len); in siw_cm_upcall()
345 event.private_data = cep->mpa.pdata; in siw_cm_upcall()
456 struct mpa_rr *rr = &cep->mpa.hdr; in siw_send_mpareqrep()
471 iov[iovec_num].iov_base = &cep->mpa.v2_ctrl; in siw_send_mpareqrep()
472 iov[iovec_num].iov_len = sizeof(cep->mpa.v2_ctrl); in siw_send_mpareqrep()
473 mpa_len += sizeof(cep->mpa.v2_ctrl); in siw_send_mpareqrep()
482 pd_len += sizeof(cep->mpa.v2_ctrl); in siw_send_mpareqrep()
502 struct mpa_rr *hdr = &cep->mpa.hdr; in siw_recv_mpa_rr()
507 if (cep->mpa.bytes_rcvd < sizeof(struct mpa_rr)) { in siw_recv_mpa_rr()
508 rcvd = ksock_recv(s, (char *)hdr + cep->mpa.bytes_rcvd, in siw_recv_mpa_rr()
509 sizeof(struct mpa_rr) - cep->mpa.bytes_rcvd, in siw_recv_mpa_rr()
514 cep->mpa.bytes_rcvd += rcvd; in siw_recv_mpa_rr()
516 if (cep->mpa.bytes_rcvd < sizeof(struct mpa_rr)) in siw_recv_mpa_rr()
529 to_rcv = pd_len - (cep->mpa.bytes_rcvd - sizeof(struct mpa_rr)); in siw_recv_mpa_rr()
560 if (!cep->mpa.pdata) { in siw_recv_mpa_rr()
561 cep->mpa.pdata = kmalloc(pd_len + 4, GFP_KERNEL); in siw_recv_mpa_rr()
562 if (!cep->mpa.pdata) in siw_recv_mpa_rr()
566 s, cep->mpa.pdata + cep->mpa.bytes_rcvd - sizeof(struct mpa_rr), in siw_recv_mpa_rr()
575 cep->mpa.bytes_rcvd += rcvd; in siw_recv_mpa_rr()
600 req = &cep->mpa.hdr; in siw_proc_mpareq()
647 struct mpa_v2_data *v2 = (struct mpa_v2_data *)cep->mpa.pdata; in siw_proc_mpareq()
660 cep->mpa.v2_ctrl.ird = htons(cep->ird); in siw_proc_mpareq()
661 cep->mpa.v2_ctrl.ord = htons(cep->ord); in siw_proc_mpareq()
672 cep->mpa.v2_ctrl.ird |= MPA_V2_PEER_TO_PEER; in siw_proc_mpareq()
675 cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_WRITE_RTR; in siw_proc_mpareq()
677 cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_READ_RTR; in siw_proc_mpareq()
679 cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_WRITE_RTR; in siw_proc_mpareq()
706 kfree(cep->mpa.pdata); in siw_proc_mpareq()
708 cep->mpa.pdata = NULL; in siw_proc_mpareq()
733 rep = &cep->mpa.hdr; in siw_proc_mpareply()
789 v2 = (struct mpa_v2_data *)cep->mpa.pdata; in siw_proc_mpareply()
825 if (cep->mpa.v2_ctrl_req.ird & MPA_V2_PEER_TO_PEER) in siw_proc_mpareply()
827 cep->mpa.v2_ctrl_req.ord & in siw_proc_mpareply()
1117 cep->mpa.hdr.params.pd_len = 0; in siw_cm_work_handler()
1429 cep->mpa.hdr.params.bits = 0; in siw_connect()
1436 __mpa_rr_set_revision(&cep->mpa.hdr.params.bits, version); in siw_connect()
1439 cep->mpa.hdr.params.bits |= MPA_RR_FLAG_GSO_EXP; in siw_connect()
1442 cep->mpa.hdr.params.bits |= MPA_RR_FLAG_CRC; in siw_connect()
1452 cep->mpa.hdr.params.bits |= MPA_RR_FLAG_ENHANCED; in siw_connect()
1454 cep->mpa.v2_ctrl.ird = htons(cep->ird); in siw_connect()
1455 cep->mpa.v2_ctrl.ord = htons(cep->ord); in siw_connect()
1458 cep->mpa.v2_ctrl.ird |= MPA_V2_PEER_TO_PEER; in siw_connect()
1459 cep->mpa.v2_ctrl.ord |= rtr_type; in siw_connect()
1462 cep->mpa.v2_ctrl_req.ird = cep->mpa.v2_ctrl.ird; in siw_connect()
1463 cep->mpa.v2_ctrl_req.ord = cep->mpa.v2_ctrl.ord; in siw_connect()
1465 memcpy(cep->mpa.hdr.key, MPA_KEY_REQ, 16); in siw_connect()
1471 cep->mpa.hdr.params.pd_len = 0; in siw_connect()
1540 if (cep->mpa.hdr.params.pd_len) { in siw_accept()
1541 cep->mpa.hdr.params.pd_len = 0; in siw_accept()
1542 kfree(cep->mpa.pdata); in siw_accept()
1543 cep->mpa.pdata = NULL; in siw_accept()
1571 if (try_gso && cep->mpa.hdr.params.bits & MPA_RR_FLAG_GSO_EXP) { in siw_accept()
1620 if (cep->mpa.v2_ctrl.ord & in siw_accept()
1626 cep->mpa.v2_ctrl.ord = in siw_accept()
1628 (cep->mpa.v2_ctrl.ord & ~MPA_V2_MASK_IRD_ORD); in siw_accept()
1629 cep->mpa.v2_ctrl.ird = in siw_accept()
1631 (cep->mpa.v2_ctrl.ird & ~MPA_V2_MASK_IRD_ORD); in siw_accept()
1643 if (cep->mpa.hdr.params.bits & MPA_RR_FLAG_CRC) in siw_accept()
1737 if (__mpa_rr_revision(cep->mpa.hdr.params.bits) >= MPA_REVISION_1) { in siw_reject()
1738 cep->mpa.hdr.params.bits |= MPA_RR_FLAG_REJECT; /* reject */ in siw_reject()