Lines Matching refs:rctxt
432 static bool xdr_count_read_segments(struct svc_rdma_recv_ctxt *rctxt, __be32 *p) in xdr_count_read_segments() argument
434 rctxt->rc_call_pcl.cl_count = 0; in xdr_count_read_segments()
435 rctxt->rc_read_pcl.cl_count = 0; in xdr_count_read_segments()
440 p = xdr_inline_decode(&rctxt->rc_stream, in xdr_count_read_segments()
450 ++rctxt->rc_read_pcl.cl_count; in xdr_count_read_segments()
452 ++rctxt->rc_call_pcl.cl_count; in xdr_count_read_segments()
455 p = xdr_inline_decode(&rctxt->rc_stream, sizeof(*p)); in xdr_count_read_segments()
474 static bool xdr_check_read_list(struct svc_rdma_recv_ctxt *rctxt) in xdr_check_read_list() argument
478 p = xdr_inline_decode(&rctxt->rc_stream, sizeof(*p)); in xdr_check_read_list()
481 if (!xdr_count_read_segments(rctxt, p)) in xdr_check_read_list()
483 if (!pcl_alloc_call(rctxt, p)) in xdr_check_read_list()
485 return pcl_alloc_read(rctxt, p); in xdr_check_read_list()
488 static bool xdr_check_write_chunk(struct svc_rdma_recv_ctxt *rctxt) in xdr_check_write_chunk() argument
493 if (xdr_stream_decode_u32(&rctxt->rc_stream, &segcount)) in xdr_check_write_chunk()
497 p = xdr_inline_decode(&rctxt->rc_stream, in xdr_check_write_chunk()
517 static bool xdr_count_write_chunks(struct svc_rdma_recv_ctxt *rctxt, __be32 *p) in xdr_count_write_chunks() argument
519 rctxt->rc_write_pcl.cl_count = 0; in xdr_count_write_chunks()
521 if (!xdr_check_write_chunk(rctxt)) in xdr_count_write_chunks()
523 ++rctxt->rc_write_pcl.cl_count; in xdr_count_write_chunks()
524 p = xdr_inline_decode(&rctxt->rc_stream, sizeof(*p)); in xdr_count_write_chunks()
546 static bool xdr_check_write_list(struct svc_rdma_recv_ctxt *rctxt) in xdr_check_write_list() argument
550 p = xdr_inline_decode(&rctxt->rc_stream, sizeof(*p)); in xdr_check_write_list()
553 if (!xdr_count_write_chunks(rctxt, p)) in xdr_check_write_list()
555 if (!pcl_alloc_write(rctxt, &rctxt->rc_write_pcl, p)) in xdr_check_write_list()
558 rctxt->rc_cur_result_payload = pcl_first_chunk(&rctxt->rc_write_pcl); in xdr_check_write_list()
574 static bool xdr_check_reply_chunk(struct svc_rdma_recv_ctxt *rctxt) in xdr_check_reply_chunk() argument
578 p = xdr_inline_decode(&rctxt->rc_stream, sizeof(*p)); in xdr_check_reply_chunk()
584 if (!xdr_check_write_chunk(rctxt)) in xdr_check_reply_chunk()
587 rctxt->rc_reply_pcl.cl_count = 1; in xdr_check_reply_chunk()
588 return pcl_alloc_write(rctxt, &rctxt->rc_reply_pcl, p); in xdr_check_reply_chunk()
663 struct svc_rdma_recv_ctxt *rctxt) in svc_rdma_xdr_decode_req() argument
669 xdr_init_decode(&rctxt->rc_stream, rq_arg, rdma_argp, NULL); in svc_rdma_xdr_decode_req()
671 p = xdr_inline_decode(&rctxt->rc_stream, in svc_rdma_xdr_decode_req()
679 rctxt->rc_msgtype = *p; in svc_rdma_xdr_decode_req()
680 switch (rctxt->rc_msgtype) { in svc_rdma_xdr_decode_req()
693 if (!xdr_check_read_list(rctxt)) in svc_rdma_xdr_decode_req()
695 if (!xdr_check_write_list(rctxt)) in svc_rdma_xdr_decode_req()
697 if (!xdr_check_reply_chunk(rctxt)) in svc_rdma_xdr_decode_req()
700 rq_arg->head[0].iov_base = rctxt->rc_stream.p; in svc_rdma_xdr_decode_req()
701 hdr_len = xdr_stream_pos(&rctxt->rc_stream); in svc_rdma_xdr_decode_req()
704 trace_svcrdma_decode_rqst(rctxt, rdma_argp, hdr_len); in svc_rdma_xdr_decode_req()
708 trace_svcrdma_decode_short_err(rctxt, rq_arg->len); in svc_rdma_xdr_decode_req()
712 trace_svcrdma_decode_badvers_err(rctxt, rdma_argp); in svc_rdma_xdr_decode_req()
716 trace_svcrdma_decode_drop_err(rctxt, rdma_argp); in svc_rdma_xdr_decode_req()
720 trace_svcrdma_decode_badproc_err(rctxt, rdma_argp); in svc_rdma_xdr_decode_req()
724 trace_svcrdma_decode_parse_err(rctxt, rdma_argp); in svc_rdma_xdr_decode_req()
729 struct svc_rdma_recv_ctxt *rctxt, in svc_rdma_send_error() argument
737 svc_rdma_send_error_msg(rdma, sctxt, rctxt, status); in svc_rdma_send_error()
746 struct svc_rdma_recv_ctxt *rctxt) in svc_rdma_is_reverse_direction_reply() argument
748 __be32 *p = rctxt->rc_recv_buf; in svc_rdma_is_reverse_direction_reply()
753 if (rctxt->rc_msgtype != rdma_msg) in svc_rdma_is_reverse_direction_reply()
756 if (!pcl_is_empty(&rctxt->rc_call_pcl)) in svc_rdma_is_reverse_direction_reply()
758 if (!pcl_is_empty(&rctxt->rc_read_pcl)) in svc_rdma_is_reverse_direction_reply()
760 if (!pcl_is_empty(&rctxt->rc_write_pcl)) in svc_rdma_is_reverse_direction_reply()
762 if (!pcl_is_empty(&rctxt->rc_reply_pcl)) in svc_rdma_is_reverse_direction_reply()