Lines Matching defs:sctxt
405 * @sctxt: Send context for the RPC Reply
412 static ssize_t svc_rdma_encode_read_list(struct svc_rdma_send_ctxt *sctxt)
415 return xdr_stream_encode_item_absent(&sctxt->sc_stream);
420 * @sctxt: Send context for the RPC Reply
430 static ssize_t svc_rdma_encode_write_segment(struct svc_rdma_send_ctxt *sctxt,
439 p = xdr_reserve_space(&sctxt->sc_stream, len);
447 trace_svcrdma_encode_wseg(sctxt, segno, segment->rs_handle, length,
454 * @sctxt: Send context for the RPC Reply
466 static ssize_t svc_rdma_encode_write_chunk(struct svc_rdma_send_ctxt *sctxt,
474 ret = xdr_stream_encode_item_present(&sctxt->sc_stream);
479 ret = xdr_stream_encode_u32(&sctxt->sc_stream, chunk->ch_segcount);
485 ret = svc_rdma_encode_write_segment(sctxt, chunk, &remaining, segno);
497 * @sctxt: Send context for the RPC Reply
505 struct svc_rdma_send_ctxt *sctxt)
512 ret = svc_rdma_encode_write_chunk(sctxt, chunk);
519 ret = xdr_stream_encode_item_absent(&sctxt->sc_stream);
529 * @sctxt: Send context for the RPC Reply
540 struct svc_rdma_send_ctxt *sctxt,
546 return xdr_stream_encode_item_absent(&sctxt->sc_stream);
553 return svc_rdma_encode_write_chunk(sctxt, chunk);
705 * @sctxt: send_ctxt for the Send WR
714 const struct svc_rdma_send_ctxt *sctxt,
720 .pd_length = sctxt->sc_hdrbuf.len,
780 * @sctxt: send_ctxt for the Send WR; xprt hdr is already prepared
795 struct svc_rdma_send_ctxt *sctxt,
800 .pd_dest = sctxt->sc_xprt_buf + sctxt->sc_hdrbuf.len,
809 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len + args.pd_length;
810 trace_svcrdma_send_pullup(sctxt, args.pd_length);
816 * @sctxt: send_ctxt for the Send WR
829 struct svc_rdma_send_ctxt *sctxt,
836 .md_ctxt = sctxt,
840 sctxt->sc_send_wr.num_sge = 1;
841 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len;
852 if (svc_rdma_pull_up_needed(rdma, sctxt, write_pcl, xdr))
853 return svc_rdma_pull_up_reply_msg(rdma, sctxt, write_pcl, xdr);
891 struct svc_rdma_send_ctxt *sctxt,
895 struct ib_send_wr *send_wr = &sctxt->sc_send_wr;
898 ret = svc_rdma_map_reply_msg(rdma, sctxt, &rctxt->rc_write_pcl,
903 /* Transfer pages involved in RDMA Writes to the sctxt's
906 svc_rdma_save_io_pages(rqstp, sctxt);
915 return svc_rdma_post_send(rdma, sctxt);
921 * @sctxt: Send context for the response
930 * The caller does not have to release @sctxt. It is released by
934 struct svc_rdma_send_ctxt *sctxt,
941 rpcrdma_set_xdrlen(&sctxt->sc_hdrbuf, 0);
942 xdr_init_encode(&sctxt->sc_stream, &sctxt->sc_hdrbuf,
943 sctxt->sc_xprt_buf, NULL);
945 p = xdr_reserve_space(&sctxt->sc_stream,
957 p = xdr_reserve_space(&sctxt->sc_stream, 3 * sizeof(*p));
967 p = xdr_reserve_space(&sctxt->sc_stream, sizeof(*p));
976 sctxt->sc_send_wr.num_sge = 1;
977 sctxt->sc_send_wr.opcode = IB_WR_SEND;
978 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len;
979 if (svc_rdma_post_send(rdma, sctxt))
984 svc_rdma_send_ctxt_put(rdma, sctxt);
1006 struct svc_rdma_send_ctxt *sctxt;
1016 sctxt = svc_rdma_send_ctxt_get(rdma);
1017 if (!sctxt)
1021 p = xdr_reserve_space(&sctxt->sc_stream,
1033 &rctxt->rc_reply_pcl, sctxt,
1045 ret = svc_rdma_encode_read_list(sctxt);
1048 ret = svc_rdma_encode_write_list(rctxt, sctxt);
1051 ret = svc_rdma_encode_reply_chunk(rctxt, sctxt, rc_size);
1055 ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp);
1067 svc_rdma_save_io_pages(rqstp, sctxt);
1068 svc_rdma_send_error_msg(rdma, sctxt, rctxt, ret);
1072 svc_rdma_send_ctxt_put(rdma, sctxt);