Lines Matching refs:xdr
133 struct xdr_buf *xdr = &rqst->rq_snd_buf; in rpcrdma_args_inline() local
137 if (xdr->len > ep->re_max_inline_send) in rpcrdma_args_inline()
140 if (xdr->page_len) { in rpcrdma_args_inline()
141 remaining = xdr->page_len; in rpcrdma_args_inline()
142 offset = offset_in_page(xdr->page_base); in rpcrdma_args_inline()
279 encode_rdma_segment(struct xdr_stream *xdr, struct rpcrdma_mr *mr) in encode_rdma_segment() argument
283 p = xdr_reserve_space(xdr, 4 * sizeof(*p)); in encode_rdma_segment()
292 encode_read_segment(struct xdr_stream *xdr, struct rpcrdma_mr *mr, in encode_read_segment() argument
297 p = xdr_reserve_space(xdr, 6 * sizeof(*p)); in encode_read_segment()
350 struct xdr_stream *xdr = &req->rl_stream; in rpcrdma_encode_read_list() local
373 if (encode_read_segment(xdr, mr, pos) < 0) in rpcrdma_encode_read_list()
382 if (xdr_stream_encode_item_absent(xdr) < 0) in rpcrdma_encode_read_list()
407 struct xdr_stream *xdr = &req->rl_stream; in rpcrdma_encode_write_list() local
423 if (xdr_stream_encode_item_present(xdr) < 0) in rpcrdma_encode_write_list()
425 segcount = xdr_reserve_space(xdr, sizeof(*segcount)); in rpcrdma_encode_write_list()
436 if (encode_rdma_segment(xdr, mr) < 0) in rpcrdma_encode_write_list()
450 if (xdr_stream_encode_item_absent(xdr) < 0) in rpcrdma_encode_write_list()
472 struct xdr_stream *xdr = &req->rl_stream; in rpcrdma_encode_reply_chunk() local
479 if (xdr_stream_encode_item_absent(xdr) < 0) in rpcrdma_encode_reply_chunk()
489 if (xdr_stream_encode_item_present(xdr) < 0) in rpcrdma_encode_reply_chunk()
491 segcount = xdr_reserve_space(xdr, sizeof(*segcount)); in rpcrdma_encode_reply_chunk()
502 if (encode_rdma_segment(xdr, mr) < 0) in rpcrdma_encode_reply_chunk()
596 struct xdr_buf *xdr) in rpcrdma_prepare_pagelist() argument
604 ppages = xdr->pages + (xdr->page_base >> PAGE_SHIFT); in rpcrdma_prepare_pagelist()
605 page_base = offset_in_page(xdr->page_base); in rpcrdma_prepare_pagelist()
606 remaining = xdr->page_len; in rpcrdma_prepare_pagelist()
636 struct xdr_buf *xdr, in rpcrdma_prepare_tail_iov() argument
642 struct page *page = virt_to_page(xdr->tail[0].iov_base); in rpcrdma_prepare_tail_iov()
663 struct xdr_buf *xdr) in rpcrdma_pullup_tail_iov() argument
667 dst = (unsigned char *)xdr->head[0].iov_base; in rpcrdma_pullup_tail_iov()
668 dst += xdr->head[0].iov_len + xdr->page_len; in rpcrdma_pullup_tail_iov()
669 memmove(dst, xdr->tail[0].iov_base, xdr->tail[0].iov_len); in rpcrdma_pullup_tail_iov()
670 r_xprt->rx_stats.pullup_copy_count += xdr->tail[0].iov_len; in rpcrdma_pullup_tail_iov()
677 struct xdr_buf *xdr) in rpcrdma_pullup_pagelist() argument
683 dst = (unsigned char *)xdr->head[0].iov_base; in rpcrdma_pullup_pagelist()
684 dst += xdr->head[0].iov_len; in rpcrdma_pullup_pagelist()
685 ppages = xdr->pages + (xdr->page_base >> PAGE_SHIFT); in rpcrdma_pullup_pagelist()
686 page_base = offset_in_page(xdr->page_base); in rpcrdma_pullup_pagelist()
687 remaining = xdr->page_len; in rpcrdma_pullup_pagelist()
713 struct xdr_buf *xdr) in rpcrdma_prepare_noch_pullup() argument
715 if (unlikely(xdr->tail[0].iov_len)) in rpcrdma_prepare_noch_pullup()
716 rpcrdma_pullup_tail_iov(r_xprt, req, xdr); in rpcrdma_prepare_noch_pullup()
718 if (unlikely(xdr->page_len)) in rpcrdma_prepare_noch_pullup()
719 rpcrdma_pullup_pagelist(r_xprt, req, xdr); in rpcrdma_prepare_noch_pullup()
722 return rpcrdma_prepare_head_iov(r_xprt, req, xdr->len); in rpcrdma_prepare_noch_pullup()
727 struct xdr_buf *xdr) in rpcrdma_prepare_noch_mapped() argument
729 struct kvec *tail = &xdr->tail[0]; in rpcrdma_prepare_noch_mapped()
731 if (!rpcrdma_prepare_head_iov(r_xprt, req, xdr->head[0].iov_len)) in rpcrdma_prepare_noch_mapped()
733 if (xdr->page_len) in rpcrdma_prepare_noch_mapped()
734 if (!rpcrdma_prepare_pagelist(req, xdr)) in rpcrdma_prepare_noch_mapped()
737 if (!rpcrdma_prepare_tail_iov(req, xdr, in rpcrdma_prepare_noch_mapped()
749 struct xdr_buf *xdr) in rpcrdma_prepare_readch() argument
751 if (!rpcrdma_prepare_head_iov(r_xprt, req, xdr->head[0].iov_len)) in rpcrdma_prepare_readch()
759 if (xdr->tail[0].iov_len > 3) { in rpcrdma_prepare_readch()
767 page_base = offset_in_page(xdr->tail[0].iov_base); in rpcrdma_prepare_readch()
768 len = xdr->tail[0].iov_len; in rpcrdma_prepare_readch()
771 if (!rpcrdma_prepare_tail_iov(req, xdr, page_base, len)) in rpcrdma_prepare_readch()
791 struct xdr_buf *xdr, in rpcrdma_prepare_send_sges() argument
813 if (!rpcrdma_prepare_noch_pullup(r_xprt, req, xdr)) in rpcrdma_prepare_send_sges()
817 if (!rpcrdma_prepare_noch_mapped(r_xprt, req, xdr)) in rpcrdma_prepare_send_sges()
821 if (!rpcrdma_prepare_readch(r_xprt, req, xdr)) in rpcrdma_prepare_send_sges()
862 struct xdr_stream *xdr = &req->rl_stream; in rpcrdma_marshal_req() local
876 xdr_init_encode(xdr, &req->rl_hdrbuf, rdmab_data(req->rl_rdmabuf), in rpcrdma_marshal_req()
881 p = xdr_reserve_space(xdr, 4 * sizeof(*p)); in rpcrdma_marshal_req()
1124 struct xdr_stream *xdr = &rep->rr_stream; in rpcrdma_is_bcall() local
1131 p = xdr_inline_decode(xdr, 0); in rpcrdma_is_bcall()
1154 p = xdr_inline_decode(xdr, 3 * sizeof(*p)); in rpcrdma_is_bcall()
1167 static int decode_rdma_segment(struct xdr_stream *xdr, u32 *length) in decode_rdma_segment() argument
1173 p = xdr_inline_decode(xdr, 4 * sizeof(*p)); in decode_rdma_segment()
1182 static int decode_write_chunk(struct xdr_stream *xdr, u32 *length) in decode_write_chunk() argument
1187 p = xdr_inline_decode(xdr, sizeof(*p)); in decode_write_chunk()
1194 if (decode_rdma_segment(xdr, &seglength)) in decode_write_chunk()
1206 static int decode_read_list(struct xdr_stream *xdr) in decode_read_list() argument
1210 p = xdr_inline_decode(xdr, sizeof(*p)); in decode_read_list()
1220 static int decode_write_list(struct xdr_stream *xdr, u32 *length) in decode_write_list() argument
1229 p = xdr_inline_decode(xdr, sizeof(*p)); in decode_write_list()
1237 if (decode_write_chunk(xdr, &chunklen)) in decode_write_list()
1245 static int decode_reply_chunk(struct xdr_stream *xdr, u32 *length) in decode_reply_chunk() argument
1249 p = xdr_inline_decode(xdr, sizeof(*p)); in decode_reply_chunk()
1255 if (decode_write_chunk(xdr, length)) in decode_reply_chunk()
1264 struct xdr_stream *xdr = &rep->rr_stream; in rpcrdma_decode_msg() local
1269 if (decode_read_list(xdr)) in rpcrdma_decode_msg()
1271 if (decode_write_list(xdr, &writelist)) in rpcrdma_decode_msg()
1273 if (decode_reply_chunk(xdr, &replychunk)) in rpcrdma_decode_msg()
1281 base = (char *)xdr_inline_decode(xdr, 0); in rpcrdma_decode_msg()
1282 rpclen = xdr_stream_remaining(xdr); in rpcrdma_decode_msg()
1293 struct xdr_stream *xdr = &rep->rr_stream; in rpcrdma_decode_nomsg() local
1297 if (decode_read_list(xdr)) in rpcrdma_decode_nomsg()
1299 if (decode_write_list(xdr, &writelist)) in rpcrdma_decode_nomsg()
1301 if (decode_reply_chunk(xdr, &replychunk)) in rpcrdma_decode_nomsg()
1319 struct xdr_stream *xdr = &rep->rr_stream; in rpcrdma_decode_error() local
1322 p = xdr_inline_decode(xdr, sizeof(*p)); in rpcrdma_decode_error()
1328 p = xdr_inline_decode(xdr, 2 * sizeof(*p)); in rpcrdma_decode_error()