Lines Matching refs:req

324 						 struct rpcrdma_req *req,
329 *mr = rpcrdma_mr_pop(&req->rl_free_mrs);
334 trace_xprtrdma_mr_get(req);
335 (*mr)->mr_req = req;
338 rpcrdma_mr_push(*mr, &req->rl_registered);
339 return frwr_map(r_xprt, seg, nsegs, writing, req->rl_slot.rq_xid, *mr);
342 trace_xprtrdma_nomrs(req);
363 struct rpcrdma_req *req,
367 struct xdr_stream *xdr = &req->rl_stream;
379 seg = req->rl_segments;
386 seg = rpcrdma_mr_prepare(r_xprt, req, seg, nsegs, false, &mr);
420 struct rpcrdma_req *req,
424 struct xdr_stream *xdr = &req->rl_stream;
433 seg = req->rl_segments;
449 seg = rpcrdma_mr_prepare(r_xprt, req, seg, nsegs, true, &mr);
485 struct rpcrdma_req *req,
489 struct xdr_stream *xdr = &req->rl_stream;
501 seg = req->rl_segments;
515 seg = rpcrdma_mr_prepare(r_xprt, req, seg, nsegs, true, &mr);
537 struct rpcrdma_req *req =
539 struct rpcrdma_rep *rep = req->rl_reply;
573 struct rpcrdma_req *req, u32 len)
575 struct rpcrdma_sendctx *sc = req->rl_sendctx;
576 struct rpcrdma_regbuf *rb = req->rl_rdmabuf;
577 struct ib_sge *sge = &sc->sc_sges[req->rl_wr.num_sge++];
591 struct rpcrdma_req *req, unsigned int len)
593 struct rpcrdma_sendctx *sc = req->rl_sendctx;
594 struct ib_sge *sge = &sc->sc_sges[req->rl_wr.num_sge++];
595 struct rpcrdma_regbuf *rb = req->rl_sendbuf;
612 static bool rpcrdma_prepare_pagelist(struct rpcrdma_req *req,
615 struct rpcrdma_sendctx *sc = req->rl_sendctx;
616 struct rpcrdma_regbuf *rb = req->rl_sendbuf;
625 sge = &sc->sc_sges[req->rl_wr.num_sge++];
652 static bool rpcrdma_prepare_tail_iov(struct rpcrdma_req *req,
656 struct rpcrdma_sendctx *sc = req->rl_sendctx;
657 struct ib_sge *sge = &sc->sc_sges[req->rl_wr.num_sge++];
658 struct rpcrdma_regbuf *rb = req->rl_sendbuf;
679 struct rpcrdma_req *req,
693 struct rpcrdma_req *req,
729 struct rpcrdma_req *req,
733 rpcrdma_pullup_tail_iov(r_xprt, req, xdr);
736 rpcrdma_pullup_pagelist(r_xprt, req, xdr);
739 return rpcrdma_prepare_head_iov(r_xprt, req, xdr->len);
743 struct rpcrdma_req *req,
748 if (!rpcrdma_prepare_head_iov(r_xprt, req, xdr->head[0].iov_len))
751 if (!rpcrdma_prepare_pagelist(req, xdr))
754 if (!rpcrdma_prepare_tail_iov(req, xdr,
759 if (req->rl_sendctx->sc_unmap_count)
760 kref_get(&req->rl_kref);
765 struct rpcrdma_req *req,
768 if (!rpcrdma_prepare_head_iov(r_xprt, req, xdr->head[0].iov_len))
788 if (!rpcrdma_prepare_tail_iov(req, xdr, page_base, len))
790 kref_get(&req->rl_kref);
799 * @req: context of RPC Call being marshalled
807 struct rpcrdma_req *req, u32 hdrlen,
814 req->rl_sendctx = rpcrdma_sendctx_get_locked(r_xprt);
815 if (!req->rl_sendctx)
817 req->rl_sendctx->sc_unmap_count = 0;
818 req->rl_sendctx->sc_req = req;
819 kref_init(&req->rl_kref);
820 req->rl_wr.wr_cqe = &req->rl_sendctx->sc_cqe;
821 req->rl_wr.sg_list = req->rl_sendctx->sc_sges;
822 req->rl_wr.num_sge = 0;
823 req->rl_wr.opcode = IB_WR_SEND;
825 rpcrdma_prepare_hdr_sge(r_xprt, req, hdrlen);
830 if (!rpcrdma_prepare_noch_pullup(r_xprt, req, xdr))
834 if (!rpcrdma_prepare_noch_mapped(r_xprt, req, xdr))
838 if (!rpcrdma_prepare_readch(r_xprt, req, xdr))
850 rpcrdma_sendctx_unmap(req->rl_sendctx);
852 trace_xprtrdma_prepsend_failed(&req->rl_slot, ret);
878 struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
879 struct xdr_stream *xdr = &req->rl_stream;
892 rpcrdma_set_xdrlen(&req->rl_hdrbuf, 0);
893 xdr_init_encode(xdr, &req->rl_hdrbuf, rdmab_data(req->rl_rdmabuf),
945 rtype = buf->len < rdmab_length(req->rl_sendbuf) ?
978 ret = rpcrdma_encode_read_list(r_xprt, req, rqst, rtype);
981 ret = rpcrdma_encode_write_list(r_xprt, req, rqst, wtype);
984 ret = rpcrdma_encode_reply_chunk(r_xprt, req, rqst, wtype);
988 ret = rpcrdma_prepare_send_sges(r_xprt, req, req->rl_hdrbuf.len,
993 trace_xprtrdma_marshal(req, rtype, wtype);
999 frwr_reset(req);
1415 struct rpcrdma_req *req =
1418 rpcrdma_complete_rqst(req->rl_reply);
1433 struct rpcrdma_req *req;
1480 req = rpcr_to_rdmar(rqst);
1481 if (req->rl_reply) {
1482 trace_xprtrdma_leaked_rep(rqst, req->rl_reply);
1483 rpcrdma_recv_buffer_put(req->rl_reply);
1485 req->rl_reply = rep;
1488 trace_xprtrdma_reply(rqst->rq_task, rep, req, credits);
1491 frwr_reminv(rep, &req->rl_registered);
1492 if (!list_empty(&req->rl_registered))
1493 frwr_unmap_async(r_xprt, req);
1496 kref_put(&req->rl_kref, rpcrdma_reply_done);