Lines Matching refs:sctxt

362 static ssize_t svc_rdma_encode_read_list(struct svc_rdma_send_ctxt *sctxt)  in svc_rdma_encode_read_list()  argument
365 return xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_read_list()
380 static ssize_t svc_rdma_encode_write_segment(struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_write_segment() argument
389 p = xdr_reserve_space(&sctxt->sc_stream, len); in svc_rdma_encode_write_segment()
397 trace_svcrdma_encode_wseg(sctxt, segno, segment->rs_handle, length, in svc_rdma_encode_write_segment()
416 static ssize_t svc_rdma_encode_write_chunk(struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_write_chunk() argument
424 ret = xdr_stream_encode_item_present(&sctxt->sc_stream); in svc_rdma_encode_write_chunk()
429 ret = xdr_stream_encode_u32(&sctxt->sc_stream, chunk->ch_segcount); in svc_rdma_encode_write_chunk()
435 ret = svc_rdma_encode_write_segment(sctxt, chunk, &remaining, segno); in svc_rdma_encode_write_chunk()
455 struct svc_rdma_send_ctxt *sctxt) in svc_rdma_encode_write_list() argument
462 ret = svc_rdma_encode_write_chunk(sctxt, chunk); in svc_rdma_encode_write_list()
469 ret = xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_write_list()
490 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_reply_chunk() argument
496 return xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_reply_chunk()
503 return svc_rdma_encode_write_chunk(sctxt, chunk); in svc_rdma_encode_reply_chunk()
664 const struct svc_rdma_send_ctxt *sctxt, in svc_rdma_pull_up_needed() argument
670 .pd_length = sctxt->sc_hdrbuf.len, in svc_rdma_pull_up_needed()
745 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_pull_up_reply_msg() argument
750 .pd_dest = sctxt->sc_xprt_buf + sctxt->sc_hdrbuf.len, in svc_rdma_pull_up_reply_msg()
759 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len + args.pd_length; in svc_rdma_pull_up_reply_msg()
760 trace_svcrdma_send_pullup(sctxt, args.pd_length); in svc_rdma_pull_up_reply_msg()
778 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_map_reply_msg() argument
784 .md_ctxt = sctxt, in svc_rdma_map_reply_msg()
788 sctxt->sc_send_wr.num_sge = 1; in svc_rdma_map_reply_msg()
789 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len; in svc_rdma_map_reply_msg()
800 if (svc_rdma_pull_up_needed(rdma, sctxt, rctxt, xdr)) in svc_rdma_map_reply_msg()
801 return svc_rdma_pull_up_reply_msg(rdma, sctxt, rctxt, xdr); in svc_rdma_map_reply_msg()
845 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_send_reply_msg() argument
851 ret = svc_rdma_map_reply_msg(rdma, sctxt, rctxt, &rqstp->rq_res); in svc_rdma_send_reply_msg()
855 svc_rdma_save_io_pages(rqstp, sctxt); in svc_rdma_send_reply_msg()
858 sctxt->sc_send_wr.opcode = IB_WR_SEND_WITH_INV; in svc_rdma_send_reply_msg()
859 sctxt->sc_send_wr.ex.invalidate_rkey = rctxt->rc_inv_rkey; in svc_rdma_send_reply_msg()
861 sctxt->sc_send_wr.opcode = IB_WR_SEND; in svc_rdma_send_reply_msg()
864 return svc_rdma_send(rdma, sctxt); in svc_rdma_send_reply_msg()
883 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_send_error_msg() argument
890 rpcrdma_set_xdrlen(&sctxt->sc_hdrbuf, 0); in svc_rdma_send_error_msg()
891 xdr_init_encode(&sctxt->sc_stream, &sctxt->sc_hdrbuf, in svc_rdma_send_error_msg()
892 sctxt->sc_xprt_buf, NULL); in svc_rdma_send_error_msg()
894 p = xdr_reserve_space(&sctxt->sc_stream, in svc_rdma_send_error_msg()
906 p = xdr_reserve_space(&sctxt->sc_stream, 3 * sizeof(*p)); in svc_rdma_send_error_msg()
916 p = xdr_reserve_space(&sctxt->sc_stream, sizeof(*p)); in svc_rdma_send_error_msg()
925 sctxt->sc_send_wr.num_sge = 1; in svc_rdma_send_error_msg()
926 sctxt->sc_send_wr.opcode = IB_WR_SEND; in svc_rdma_send_error_msg()
927 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len; in svc_rdma_send_error_msg()
928 if (svc_rdma_send(rdma, sctxt)) in svc_rdma_send_error_msg()
933 svc_rdma_send_ctxt_put(rdma, sctxt); in svc_rdma_send_error_msg()
955 struct svc_rdma_send_ctxt *sctxt; in svc_rdma_sendto() local
965 sctxt = svc_rdma_send_ctxt_get(rdma); in svc_rdma_sendto()
966 if (!sctxt) in svc_rdma_sendto()
970 p = xdr_reserve_space(&sctxt->sc_stream, in svc_rdma_sendto()
985 ret = svc_rdma_encode_read_list(sctxt); in svc_rdma_sendto()
988 ret = svc_rdma_encode_write_list(rctxt, sctxt); in svc_rdma_sendto()
991 ret = svc_rdma_encode_reply_chunk(rctxt, sctxt, rc_size); in svc_rdma_sendto()
995 ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp); in svc_rdma_sendto()
1007 svc_rdma_save_io_pages(rqstp, sctxt); in svc_rdma_sendto()
1008 svc_rdma_send_error_msg(rdma, sctxt, rctxt, ret); in svc_rdma_sendto()
1012 svc_rdma_send_ctxt_put(rdma, sctxt); in svc_rdma_sendto()