Lines Matching defs:sctxt

355  * @sctxt: Send context for the RPC Reply
362 static ssize_t svc_rdma_encode_read_list(struct svc_rdma_send_ctxt *sctxt)
365 return xdr_stream_encode_item_absent(&sctxt->sc_stream);
370 * @sctxt: Send context for the RPC Reply
380 static ssize_t svc_rdma_encode_write_segment(struct svc_rdma_send_ctxt *sctxt,
389 p = xdr_reserve_space(&sctxt->sc_stream, len);
397 trace_svcrdma_encode_wseg(sctxt, segno, segment->rs_handle, length,
404 * @sctxt: Send context for the RPC Reply
416 static ssize_t svc_rdma_encode_write_chunk(struct svc_rdma_send_ctxt *sctxt,
424 ret = xdr_stream_encode_item_present(&sctxt->sc_stream);
429 ret = xdr_stream_encode_u32(&sctxt->sc_stream, chunk->ch_segcount);
435 ret = svc_rdma_encode_write_segment(sctxt, chunk, &remaining, segno);
447 * @sctxt: Send context for the RPC Reply
455 struct svc_rdma_send_ctxt *sctxt)
462 ret = svc_rdma_encode_write_chunk(sctxt, chunk);
469 ret = xdr_stream_encode_item_absent(&sctxt->sc_stream);
479 * @sctxt: Send context for the RPC Reply
490 struct svc_rdma_send_ctxt *sctxt,
496 return xdr_stream_encode_item_absent(&sctxt->sc_stream);
503 return svc_rdma_encode_write_chunk(sctxt, chunk);
655 * @sctxt: send_ctxt for the Send WR
664 const struct svc_rdma_send_ctxt *sctxt,
670 .pd_length = sctxt->sc_hdrbuf.len,
730 * @sctxt: send_ctxt for the Send WR; xprt hdr is already prepared
745 struct svc_rdma_send_ctxt *sctxt,
750 .pd_dest = sctxt->sc_xprt_buf + sctxt->sc_hdrbuf.len,
759 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len + args.pd_length;
760 trace_svcrdma_send_pullup(sctxt, args.pd_length);
766 * @sctxt: send_ctxt for the Send WR
778 struct svc_rdma_send_ctxt *sctxt,
784 .md_ctxt = sctxt,
788 sctxt->sc_send_wr.num_sge = 1;
789 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len;
800 if (svc_rdma_pull_up_needed(rdma, sctxt, rctxt, xdr))
801 return svc_rdma_pull_up_reply_msg(rdma, sctxt, rctxt, xdr);
837 * of the rqstp and into the sctxt's page array. These pages are
845 struct svc_rdma_send_ctxt *sctxt,
851 ret = svc_rdma_map_reply_msg(rdma, sctxt, rctxt, &rqstp->rq_res);
855 svc_rdma_save_io_pages(rqstp, sctxt);
858 sctxt->sc_send_wr.opcode = IB_WR_SEND_WITH_INV;
859 sctxt->sc_send_wr.ex.invalidate_rkey = rctxt->rc_inv_rkey;
861 sctxt->sc_send_wr.opcode = IB_WR_SEND;
864 return svc_rdma_send(rdma, sctxt);
870 * @sctxt: Send context for the response
879 * The caller does not have to release @sctxt. It is released by
883 struct svc_rdma_send_ctxt *sctxt,
890 rpcrdma_set_xdrlen(&sctxt->sc_hdrbuf, 0);
891 xdr_init_encode(&sctxt->sc_stream, &sctxt->sc_hdrbuf,
892 sctxt->sc_xprt_buf, NULL);
894 p = xdr_reserve_space(&sctxt->sc_stream,
906 p = xdr_reserve_space(&sctxt->sc_stream, 3 * sizeof(*p));
916 p = xdr_reserve_space(&sctxt->sc_stream, sizeof(*p));
925 sctxt->sc_send_wr.num_sge = 1;
926 sctxt->sc_send_wr.opcode = IB_WR_SEND;
927 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len;
928 if (svc_rdma_send(rdma, sctxt))
933 svc_rdma_send_ctxt_put(rdma, sctxt);
955 struct svc_rdma_send_ctxt *sctxt;
965 sctxt = svc_rdma_send_ctxt_get(rdma);
966 if (!sctxt)
970 p = xdr_reserve_space(&sctxt->sc_stream,
985 ret = svc_rdma_encode_read_list(sctxt);
988 ret = svc_rdma_encode_write_list(rctxt, sctxt);
991 ret = svc_rdma_encode_reply_chunk(rctxt, sctxt, rc_size);
995 ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp);
1007 svc_rdma_save_io_pages(rqstp, sctxt);
1008 svc_rdma_send_error_msg(rdma, sctxt, rctxt, ret);
1012 svc_rdma_send_ctxt_put(rdma, sctxt);