Lines Matching refs:rv

300 	int rv = kernel_sendmsg(s, &msg, &iov, 1,  in siw_tx_ctrl()  local
303 if (rv >= 0) { in siw_tx_ctrl()
304 c_tx->ctrl_sent += rv; in siw_tx_ctrl()
307 rv = 0; in siw_tx_ctrl()
309 rv = -EAGAIN; in siw_tx_ctrl()
311 return rv; in siw_tx_ctrl()
331 int i = 0, rv = 0, sent = 0; in siw_tcp_sendpages() local
345 rv = tcp_sendmsg_locked(sk, &msg, size); in siw_tcp_sendpages()
348 if (rv > 0) { in siw_tcp_sendpages()
349 size -= rv; in siw_tcp_sendpages()
350 sent += rv; in siw_tcp_sendpages()
351 if (rv != bytes) { in siw_tcp_sendpages()
352 offset += rv; in siw_tcp_sendpages()
353 bytes -= rv; in siw_tcp_sendpages()
358 if (rv == -EAGAIN || rv == 0) in siw_tcp_sendpages()
360 return rv; in siw_tcp_sendpages()
378 int i = 0, sent = 0, rv; in siw_0copy_tx() local
384 rv = siw_tcp_sendpages(s, &page[i], offset, sge_bytes); in siw_0copy_tx()
385 if (rv >= 0) { in siw_0copy_tx()
386 sent += rv; in siw_0copy_tx()
387 if (size == sent || sge_bytes > rv) in siw_0copy_tx()
395 sent = rv; in siw_0copy_tx()
444 int seg = 0, do_crc = c_tx->do_crc, is_kva = 0, rv; in siw_tx_hdt() local
452 rv = siw_tx_ctrl(c_tx, s, MSG_DONTWAIT | MSG_MORE); in siw_tx_hdt()
453 if (rv) in siw_tx_hdt()
515 rv = -EFAULT; in siw_tx_hdt()
564 rv = -EMSGSIZE; in siw_tx_hdt()
601 rv = siw_0copy_tx(s, page_array, &wqe->sqe.sge[c_tx->sge_idx], in siw_tx_hdt()
603 if (rv == data_len) { in siw_tx_hdt()
604 rv = kernel_sendmsg(s, &msg, &iov[seg], 1, trl_len); in siw_tx_hdt()
605 if (rv > 0) in siw_tx_hdt()
606 rv += data_len; in siw_tx_hdt()
608 rv = data_len; in siw_tx_hdt()
611 rv = kernel_sendmsg(s, &msg, iov, seg + 1, in siw_tx_hdt()
615 if (rv < (int)hdr_len) { in siw_tx_hdt()
618 if (rv >= 0) { in siw_tx_hdt()
619 c_tx->ctrl_sent += rv; in siw_tx_hdt()
620 rv = -EAGAIN; in siw_tx_hdt()
624 rv -= hdr_len; in siw_tx_hdt()
626 if (rv >= (int)data_len) { in siw_tx_hdt()
634 rv -= data_len; in siw_tx_hdt()
636 if (rv == trl_len) /* all pushed */ in siw_tx_hdt()
637 rv = 0; in siw_tx_hdt()
641 c_tx->ctrl_sent = rv + 4 - c_tx->pad; in siw_tx_hdt()
643 rv = -EAGAIN; in siw_tx_hdt()
649 wqe->processed -= data_len - rv; in siw_tx_hdt()
651 if (rv) { in siw_tx_hdt()
658 c_tx->bytes_unsent -= rv; in siw_tx_hdt()
662 while (sge_unsent <= rv) { in siw_tx_hdt()
663 rv -= sge_unsent; in siw_tx_hdt()
669 c_tx->sge_off += rv; in siw_tx_hdt()
671 rv = -EAGAIN; in siw_tx_hdt()
676 return rv; in siw_tx_hdt()
784 int rv = siw_check_sge(pd, sge, &wqe->mem[i], perms, 0, in siw_check_sgl_tx() local
787 if (unlikely(rv != E_ACCESS_OK)) in siw_check_sgl_tx()
788 return rv; in siw_check_sgl_tx()
804 int rv = 0, burst_len = qp->tx_ctx.burst; in siw_qp_sq_proc_tx() local
825 rv = siw_check_sgl_tx(qp->pd, wqe, 0); in siw_qp_sq_proc_tx()
826 if (rv < 0) { in siw_qp_sq_proc_tx()
829 ecode = siw_rdmap_error(-rv); in siw_qp_sq_proc_tx()
830 rv = -EINVAL; in siw_qp_sq_proc_tx()
833 wqe->bytes = rv; in siw_qp_sq_proc_tx()
841 rv = -EINVAL; in siw_qp_sq_proc_tx()
853 rv = siw_qp_prepare_tx(c_tx); in siw_qp_sq_proc_tx()
854 if (rv == PKT_FRAGMENTED) { in siw_qp_sq_proc_tx()
857 } else if (rv == PKT_COMPLETE) { in siw_qp_sq_proc_tx()
870 rv = -EINPROGRESS; in siw_qp_sq_proc_tx()
887 rv = siw_tx_ctrl(c_tx, s, msg_flags); in siw_qp_sq_proc_tx()
889 if (!rv && tx_type != SIW_OP_READ && in siw_qp_sq_proc_tx()
896 rv = siw_tx_hdt(c_tx, s); in siw_qp_sq_proc_tx()
898 if (!rv) { in siw_qp_sq_proc_tx()
909 rv = -ECONNABORTED; in siw_qp_sq_proc_tx()
925 return rv; in siw_qp_sq_proc_tx()
935 return rv; in siw_qp_sq_proc_tx()
943 int rv = 0; in siw_fastreg_mr() local
965 rv = -EINVAL; in siw_fastreg_mr()
970 rv = -EINVAL; in siw_fastreg_mr()
982 return rv; in siw_fastreg_mr()
987 int rv; in siw_qp_sq_proc_local() local
991 rv = siw_fastreg_mr(qp->pd, &wqe->sqe); in siw_qp_sq_proc_local()
995 rv = siw_invalidate_stag(qp->pd, wqe->sqe.rkey); in siw_qp_sq_proc_local()
999 rv = -EINVAL; in siw_qp_sq_proc_local()
1001 return rv; in siw_qp_sq_proc_local()
1036 int rv = 0; in siw_qp_sq_process() local
1051 rv = siw_qp_sq_proc_tx(qp, wqe); in siw_qp_sq_process()
1053 rv = siw_qp_sq_proc_local(qp, wqe); in siw_qp_sq_process()
1055 if (!rv) { in siw_qp_sq_process()
1086 rv = -EINVAL; in siw_qp_sq_process()
1092 rv = siw_activate_tx(qp); in siw_qp_sq_process()
1095 if (rv <= 0) in siw_qp_sq_process()
1100 } else if (rv == -EAGAIN) { in siw_qp_sq_process()
1104 rv = 0; in siw_qp_sq_process()
1106 } else if (rv == -EINPROGRESS) { in siw_qp_sq_process()
1107 rv = siw_sq_start(qp); in siw_qp_sq_process()
1123 tx_type(wqe), rv); in siw_qp_sq_process()
1162 siw_dbg_qp(qp, "proc. read.response failed: %d\n", rv); in siw_qp_sq_process()
1172 rv = -EINVAL; in siw_qp_sq_process()
1177 return rv; in siw_qp_sq_process()
1185 int rv = siw_qp_sq_process(qp); in siw_sq_resume() local
1189 if (unlikely(rv < 0)) { in siw_sq_resume()
1190 siw_dbg_qp(qp, "SQ task failed: err %d\n", rv); in siw_sq_resume()