Lines Matching refs:sctxt
349 static ssize_t svc_rdma_encode_read_list(struct svc_rdma_send_ctxt *sctxt) in svc_rdma_encode_read_list() argument
352 return xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_read_list()
367 static ssize_t svc_rdma_encode_write_segment(struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_write_segment() argument
376 p = xdr_reserve_space(&sctxt->sc_stream, len); in svc_rdma_encode_write_segment()
384 trace_svcrdma_encode_wseg(sctxt, segno, segment->rs_handle, length, in svc_rdma_encode_write_segment()
403 static ssize_t svc_rdma_encode_write_chunk(struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_write_chunk() argument
411 ret = xdr_stream_encode_item_present(&sctxt->sc_stream); in svc_rdma_encode_write_chunk()
416 ret = xdr_stream_encode_u32(&sctxt->sc_stream, chunk->ch_segcount); in svc_rdma_encode_write_chunk()
422 ret = svc_rdma_encode_write_segment(sctxt, chunk, &remaining, segno); in svc_rdma_encode_write_chunk()
442 struct svc_rdma_send_ctxt *sctxt) in svc_rdma_encode_write_list() argument
449 ret = svc_rdma_encode_write_chunk(sctxt, chunk); in svc_rdma_encode_write_list()
456 ret = xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_write_list()
477 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_encode_reply_chunk() argument
483 return xdr_stream_encode_item_absent(&sctxt->sc_stream); in svc_rdma_encode_reply_chunk()
490 return svc_rdma_encode_write_chunk(sctxt, chunk); in svc_rdma_encode_reply_chunk()
651 const struct svc_rdma_send_ctxt *sctxt, in svc_rdma_pull_up_needed() argument
657 .pd_length = sctxt->sc_hdrbuf.len, in svc_rdma_pull_up_needed()
732 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_pull_up_reply_msg() argument
737 .pd_dest = sctxt->sc_xprt_buf + sctxt->sc_hdrbuf.len, in svc_rdma_pull_up_reply_msg()
746 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len + args.pd_length; in svc_rdma_pull_up_reply_msg()
747 trace_svcrdma_send_pullup(sctxt, args.pd_length); in svc_rdma_pull_up_reply_msg()
765 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_map_reply_msg() argument
771 .md_ctxt = sctxt, in svc_rdma_map_reply_msg()
775 sctxt->sc_send_wr.num_sge = 1; in svc_rdma_map_reply_msg()
776 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len; in svc_rdma_map_reply_msg()
787 if (svc_rdma_pull_up_needed(rdma, sctxt, rctxt, xdr)) in svc_rdma_map_reply_msg()
788 return svc_rdma_pull_up_reply_msg(rdma, sctxt, rctxt, xdr); in svc_rdma_map_reply_msg()
813 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_send_reply_msg() argument
819 ret = svc_rdma_map_reply_msg(rdma, sctxt, rctxt, &rqstp->rq_res); in svc_rdma_send_reply_msg()
824 sctxt->sc_send_wr.opcode = IB_WR_SEND_WITH_INV; in svc_rdma_send_reply_msg()
825 sctxt->sc_send_wr.ex.invalidate_rkey = rctxt->rc_inv_rkey; in svc_rdma_send_reply_msg()
827 sctxt->sc_send_wr.opcode = IB_WR_SEND; in svc_rdma_send_reply_msg()
830 ret = svc_rdma_send(rdma, sctxt); in svc_rdma_send_reply_msg()
834 ret = wait_for_completion_killable(&sctxt->sc_done); in svc_rdma_send_reply_msg()
835 svc_rdma_send_ctxt_put(rdma, sctxt); in svc_rdma_send_reply_msg()
855 struct svc_rdma_send_ctxt *sctxt, in svc_rdma_send_error_msg() argument
862 rpcrdma_set_xdrlen(&sctxt->sc_hdrbuf, 0); in svc_rdma_send_error_msg()
863 xdr_init_encode(&sctxt->sc_stream, &sctxt->sc_hdrbuf, in svc_rdma_send_error_msg()
864 sctxt->sc_xprt_buf, NULL); in svc_rdma_send_error_msg()
866 p = xdr_reserve_space(&sctxt->sc_stream, in svc_rdma_send_error_msg()
878 p = xdr_reserve_space(&sctxt->sc_stream, 3 * sizeof(*p)); in svc_rdma_send_error_msg()
888 p = xdr_reserve_space(&sctxt->sc_stream, sizeof(*p)); in svc_rdma_send_error_msg()
897 sctxt->sc_send_wr.num_sge = 1; in svc_rdma_send_error_msg()
898 sctxt->sc_send_wr.opcode = IB_WR_SEND; in svc_rdma_send_error_msg()
899 sctxt->sc_sges[0].length = sctxt->sc_hdrbuf.len; in svc_rdma_send_error_msg()
900 if (svc_rdma_send(rdma, sctxt)) in svc_rdma_send_error_msg()
903 wait_for_completion_killable(&sctxt->sc_done); in svc_rdma_send_error_msg()
906 svc_rdma_send_ctxt_put(rdma, sctxt); in svc_rdma_send_error_msg()
928 struct svc_rdma_send_ctxt *sctxt; in svc_rdma_sendto() local
938 sctxt = svc_rdma_send_ctxt_get(rdma); in svc_rdma_sendto()
939 if (!sctxt) in svc_rdma_sendto()
943 p = xdr_reserve_space(&sctxt->sc_stream, in svc_rdma_sendto()
958 ret = svc_rdma_encode_read_list(sctxt); in svc_rdma_sendto()
961 ret = svc_rdma_encode_write_list(rctxt, sctxt); in svc_rdma_sendto()
964 ret = svc_rdma_encode_reply_chunk(rctxt, sctxt, rc_size); in svc_rdma_sendto()
968 ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp); in svc_rdma_sendto()
982 svc_rdma_send_error_msg(rdma, sctxt, rctxt, ret); in svc_rdma_sendto()
986 svc_rdma_send_ctxt_put(rdma, sctxt); in svc_rdma_sendto()