Lines Matching refs:rv
36 int pg_off, bytes, rv; in siw_rx_umem() local
57 rv = skb_copy_bits(srx->skb, srx->skb_offset, dest + pg_off, in siw_rx_umem()
60 if (unlikely(rv)) { in siw_rx_umem()
66 qp_id(rx_qp(srx)), __func__, len, p, rv); in siw_rx_umem()
106 int rv; in siw_rx_kva() local
110 rv = skb_copy_bits(srx->skb, srx->skb_offset, kva, len); in siw_rx_kva()
111 if (unlikely(rv)) { in siw_rx_kva()
113 qp_id(rx_qp(srx)), __func__, len, kva, rv); in siw_rx_kva()
115 return rv; in siw_rx_kva()
428 int rv = 0; in siw_proc_send() local
442 rv = siw_send_check_ntoh(srx, frx); in siw_proc_send()
443 if (unlikely(rv)) { in siw_proc_send()
445 return rv; in siw_proc_send()
477 rv = siw_check_sge(pd, sge, mem, IB_ACCESS_LOCAL_WRITE, in siw_proc_send()
479 if (unlikely(rv)) { in siw_proc_send()
489 rv = siw_rx_kva(srx, in siw_proc_send()
493 rv = siw_rx_umem(srx, mem_p->umem, in siw_proc_send()
496 rv = siw_rx_pbl(srx, &frx->pbl_idx, mem_p, in siw_proc_send()
499 if (unlikely(rv != sge_bytes)) { in siw_proc_send()
507 frx->sge_off += rv; in siw_proc_send()
514 data_bytes -= rv; in siw_proc_send()
515 rcvd_bytes += rv; in siw_proc_send()
517 srx->fpdu_part_rem -= rv; in siw_proc_send()
518 srx->fpdu_part_rcvd += rv; in siw_proc_send()
525 return (rv < 0) ? rv : -EAGAIN; in siw_proc_send()
545 int bytes, rv; in siw_proc_write() local
551 rv = siw_write_check_ntoh(srx, frx); in siw_proc_write()
552 if (unlikely(rv)) { in siw_proc_write()
554 return rv; in siw_proc_write()
589 rv = siw_check_mem(qp->pd, mem, srx->ddp_to + srx->fpdu_part_rcvd, in siw_proc_write()
591 if (unlikely(rv)) { in siw_proc_write()
593 DDP_ETYPE_TAGGED_BUF, siw_tagged_error(-rv), in siw_proc_write()
602 rv = siw_rx_kva(srx, in siw_proc_write()
606 rv = siw_rx_umem(srx, mem->umem, in siw_proc_write()
609 rv = siw_rx_pbl(srx, &frx->pbl_idx, mem, in siw_proc_write()
612 if (unlikely(rv != bytes)) { in siw_proc_write()
618 srx->fpdu_part_rem -= rv; in siw_proc_write()
619 srx->fpdu_part_rcvd += rv; in siw_proc_write()
672 int run_sq = 1, rv = 0; in siw_init_rresp() local
726 rv = -EPROTO; in siw_init_rresp()
732 rv = siw_sq_start(qp); in siw_init_rresp()
734 return rv; in siw_init_rresp()
793 int bytes, rv; in siw_proc_rresp() local
799 rv = -EPROTO; in siw_proc_rresp()
805 rv = siw_orqe_start_rx(qp); in siw_proc_rresp()
806 if (rv) { in siw_proc_rresp()
811 rv = siw_rresp_check_ntoh(srx, frx); in siw_proc_rresp()
812 if (unlikely(rv)) { in siw_proc_rresp()
814 return rv; in siw_proc_rresp()
820 rv = -EPROTO; in siw_proc_rresp()
834 rv = siw_check_sge(qp->pd, sge, mem, IB_ACCESS_LOCAL_WRITE, 0, in siw_proc_rresp()
836 if (unlikely(rv)) { in siw_proc_rresp()
837 siw_dbg_qp(qp, "target mem check: %d\n", rv); in siw_proc_rresp()
842 siw_tagged_error(-rv), 0); in siw_proc_rresp()
854 rv = siw_rx_kva(srx, in siw_proc_rresp()
858 rv = siw_rx_umem(srx, mem_p->umem, sge->laddr + wqe->processed, in siw_proc_rresp()
861 rv = siw_rx_pbl(srx, &frx->pbl_idx, mem_p, in siw_proc_rresp()
863 if (rv != bytes) { in siw_proc_rresp()
865 rv = -EINVAL; in siw_proc_rresp()
868 srx->fpdu_part_rem -= rv; in siw_proc_rresp()
869 srx->fpdu_part_rcvd += rv; in siw_proc_rresp()
870 wqe->processed += rv; in siw_proc_rresp()
881 return rv; in siw_proc_rresp()
1154 int resume_tx = 0, rv = 0; in siw_check_tx_fence() local
1169 rv = -EPROTO; in siw_check_tx_fence()
1180 rv = -EPROTO; in siw_check_tx_fence()
1202 rv = siw_sq_start(qp); in siw_check_tx_fence()
1204 return rv; in siw_check_tx_fence()
1225 int rv = 0; in siw_rdmap_complete() local
1248 rv = siw_invalidate_stag(qp->pd, srx->inval_stag); in siw_rdmap_complete()
1249 if (rv) { in siw_rdmap_complete()
1252 rv == -EACCES ? in siw_rdmap_complete()
1259 rv = siw_rqe_complete(qp, &wqe->rqe, wqe->processed, in siw_rdmap_complete()
1260 rv ? 0 : srx->inval_stag, in siw_rdmap_complete()
1263 rv = siw_rqe_complete(qp, &wqe->rqe, wqe->processed, in siw_rdmap_complete()
1286 rv = siw_invalidate_stag(qp->pd, wqe->sqe.sge[0].lkey); in siw_rdmap_complete()
1287 if (rv) { in siw_rdmap_complete()
1294 error = rv; in siw_rdmap_complete()
1302 rv = siw_sqe_complete(qp, &wqe->sqe, wqe->processed, in siw_rdmap_complete()
1307 rv = siw_check_tx_fence(qp); in siw_rdmap_complete()
1317 rv = siw_init_rresp(qp, srx); in siw_rdmap_complete()
1343 return rv; in siw_rdmap_complete()
1361 int rv; in siw_tcp_rx_data() local
1380 rv = siw_get_hdr(srx); in siw_tcp_rx_data()
1381 if (!rv) { in siw_tcp_rx_data()
1411 rv = iwarp_pktinfo[qp->rx_stream.rdmap_op].rx_data(qp); in siw_tcp_rx_data()
1412 if (!rv) { in siw_tcp_rx_data()
1422 if (unlikely(rv == -ECONNRESET)) in siw_tcp_rx_data()
1433 rv = siw_get_trailer(qp, srx); in siw_tcp_rx_data()
1434 if (likely(!rv)) { in siw_tcp_rx_data()
1447 rv = siw_rdmap_complete(qp, 0); in siw_tcp_rx_data()
1454 rv = -EPROTO; in siw_tcp_rx_data()
1457 if (unlikely(rv != 0 && rv != -EAGAIN)) { in siw_tcp_rx_data()
1460 siw_rdmap_complete(qp, rv); in siw_tcp_rx_data()
1462 siw_dbg_qp(qp, "rx error %d, rx state %d\n", rv, in siw_tcp_rx_data()
1469 if (rv) { in siw_tcp_rx_data()