Lines Matching refs:rqstp
57 static void rdma_build_arg_xdr(struct svc_rqst *rqstp, in rdma_build_arg_xdr() argument
67 put_page(rqstp->rq_pages[0]); in rdma_build_arg_xdr()
68 rqstp->rq_pages[0] = page; in rdma_build_arg_xdr()
71 rqstp->rq_arg.head[0].iov_base = page_address(page); in rdma_build_arg_xdr()
72 rqstp->rq_arg.head[0].iov_len = min(byte_count, ctxt->sge[0].length); in rdma_build_arg_xdr()
73 rqstp->rq_arg.len = byte_count; in rdma_build_arg_xdr()
74 rqstp->rq_arg.buflen = byte_count; in rdma_build_arg_xdr()
77 bc = byte_count - rqstp->rq_arg.head[0].iov_len; in rdma_build_arg_xdr()
80 rqstp->rq_arg.page_len = bc; in rdma_build_arg_xdr()
81 rqstp->rq_arg.page_base = 0; in rdma_build_arg_xdr()
82 rqstp->rq_arg.pages = &rqstp->rq_pages[1]; in rdma_build_arg_xdr()
86 put_page(rqstp->rq_pages[sge_no]); in rdma_build_arg_xdr()
87 rqstp->rq_pages[sge_no] = page; in rdma_build_arg_xdr()
89 rqstp->rq_arg.buflen += ctxt->sge[sge_no].length; in rdma_build_arg_xdr()
92 rqstp->rq_respages = &rqstp->rq_pages[sge_no]; in rdma_build_arg_xdr()
98 BUG_ON((rqstp->rq_arg.head[0].iov_len + rqstp->rq_arg.page_len) in rdma_build_arg_xdr()
100 BUG_ON(rqstp->rq_arg.len != byte_count); in rdma_build_arg_xdr()
111 rqstp->rq_arg.tail[0].iov_base = NULL; in rdma_build_arg_xdr()
112 rqstp->rq_arg.tail[0].iov_len = 0; in rdma_build_arg_xdr()
129 struct svc_rqst *rqstp, in map_read_chunks() argument
151 head->arg.head[0] = rqstp->rq_arg.head[0]; in map_read_chunks()
152 head->arg.tail[0] = rqstp->rq_arg.tail[0]; in map_read_chunks()
157 head->arg.len = rqstp->rq_arg.len + ch_bytes; in map_read_chunks()
158 head->arg.buflen = rqstp->rq_arg.buflen + ch_bytes; in map_read_chunks()
163 page_address(rqstp->rq_arg.pages[page_no]) + page_off; in map_read_chunks()
170 head->arg.pages[page_no] = rqstp->rq_arg.pages[page_no]; in map_read_chunks()
171 rqstp->rq_respages = &rqstp->rq_arg.pages[page_no+1]; in map_read_chunks()
229 struct svc_rqst *rqstp, in fast_reg_read_chunks() argument
249 head->arg.head[0] = rqstp->rq_arg.head[0]; in fast_reg_read_chunks()
250 head->arg.tail[0] = rqstp->rq_arg.tail[0]; in fast_reg_read_chunks()
255 head->arg.len = rqstp->rq_arg.len + byte_count; in fast_reg_read_chunks()
256 head->arg.buflen = rqstp->rq_arg.buflen + byte_count; in fast_reg_read_chunks()
259 frmr->kva = page_address(rqstp->rq_arg.pages[0]); in fast_reg_read_chunks()
267 rqstp->rq_arg.pages[page_no], 0, in fast_reg_read_chunks()
273 head->arg.pages[page_no] = rqstp->rq_arg.pages[page_no]; in fast_reg_read_chunks()
278 rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; in fast_reg_read_chunks()
383 struct svc_rqst *rqstp, in rdma_read_xdr() argument
413 sge_count = map_read_chunks(xprt, rqstp, hdr_ctxt, rmsgp, in rdma_read_xdr()
417 sge_count = fast_reg_read_chunks(xprt, rqstp, hdr_ctxt, rmsgp, in rdma_read_xdr()
520 for (ch_no = 0; &rqstp->rq_pages[ch_no] < rqstp->rq_respages; ch_no++) in rdma_read_xdr()
521 rqstp->rq_pages[ch_no] = NULL; in rdma_read_xdr()
527 while (rqstp->rq_next_page != rqstp->rq_respages) in rdma_read_xdr()
528 *(--rqstp->rq_next_page) = NULL; in rdma_read_xdr()
533 static int rdma_read_complete(struct svc_rqst *rqstp, in rdma_read_complete() argument
543 put_page(rqstp->rq_pages[page_no]); in rdma_read_complete()
544 rqstp->rq_pages[page_no] = head->pages[page_no]; in rdma_read_complete()
547 rqstp->rq_arg.pages = &rqstp->rq_pages[head->hdr_count]; in rdma_read_complete()
548 rqstp->rq_arg.page_len = head->arg.page_len; in rdma_read_complete()
549 rqstp->rq_arg.page_base = head->arg.page_base; in rdma_read_complete()
552 rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; in rdma_read_complete()
553 rqstp->rq_next_page = &rqstp->rq_arg.pages[page_no]; in rdma_read_complete()
556 rqstp->rq_arg.head[0] = head->arg.head[0]; in rdma_read_complete()
557 rqstp->rq_arg.tail[0] = head->arg.tail[0]; in rdma_read_complete()
558 rqstp->rq_arg.len = head->arg.len; in rdma_read_complete()
559 rqstp->rq_arg.buflen = head->arg.buflen; in rdma_read_complete()
565 rqstp->rq_prot = IPPROTO_MAX; in rdma_read_complete()
566 svc_xprt_copy_addrs(rqstp, rqstp->rq_xprt); in rdma_read_complete()
568 ret = rqstp->rq_arg.head[0].iov_len in rdma_read_complete()
569 + rqstp->rq_arg.page_len in rdma_read_complete()
570 + rqstp->rq_arg.tail[0].iov_len; in rdma_read_complete()
573 ret, rqstp->rq_arg.len, rqstp->rq_arg.head[0].iov_base, in rdma_read_complete()
574 rqstp->rq_arg.head[0].iov_len); in rdma_read_complete()
584 int svc_rdma_recvfrom(struct svc_rqst *rqstp) in svc_rdma_recvfrom() argument
586 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_recvfrom()
594 dprintk("svcrdma: rqstp=%p\n", rqstp); in svc_rdma_recvfrom()
605 return rdma_read_complete(rqstp, ctxt); in svc_rdma_recvfrom()
632 ctxt, rdma_xprt, rqstp, ctxt->wc_status); in svc_rdma_recvfrom()
637 rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len); in svc_rdma_recvfrom()
640 len = svc_rdma_xdr_decode_req(&rmsgp, rqstp); in svc_rdma_recvfrom()
641 rqstp->rq_xprt_hlen = len; in svc_rdma_recvfrom()
651 ret = rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt); in svc_rdma_recvfrom()
662 ret = rqstp->rq_arg.head[0].iov_len in svc_rdma_recvfrom()
663 + rqstp->rq_arg.page_len in svc_rdma_recvfrom()
664 + rqstp->rq_arg.tail[0].iov_len; in svc_rdma_recvfrom()
669 ret, rqstp->rq_arg.len, in svc_rdma_recvfrom()
670 rqstp->rq_arg.head[0].iov_base, in svc_rdma_recvfrom()
671 rqstp->rq_arg.head[0].iov_len); in svc_rdma_recvfrom()
672 rqstp->rq_prot = IPPROTO_MAX; in svc_rdma_recvfrom()
673 svc_xprt_copy_addrs(rqstp, xprt); in svc_rdma_recvfrom()