Lines Matching refs:ctxt

59 			       struct svc_rdma_op_ctxt *ctxt,  in rdma_build_arg_xdr()  argument
68 page = ctxt->pages[0]; in rdma_build_arg_xdr()
75 min_t(size_t, byte_count, ctxt->sge[0].length); in rdma_build_arg_xdr()
94 while (bc && sge_no < ctxt->count) { in rdma_build_arg_xdr()
95 page = ctxt->pages[sge_no]; in rdma_build_arg_xdr()
98 bc -= min_t(u32, bc, ctxt->sge[sge_no].length); in rdma_build_arg_xdr()
99 rqstp->rq_arg.buflen += ctxt->sge[sge_no].length; in rdma_build_arg_xdr()
107 while (sge_no < ctxt->count) { in rdma_build_arg_xdr()
108 page = ctxt->pages[sge_no++]; in rdma_build_arg_xdr()
111 ctxt->count = bc; in rdma_build_arg_xdr()
131 struct svc_rdma_op_ctxt *ctxt = svc_rdma_get_context(xprt); in rdma_read_chunk_lcl() local
136 ctxt->direction = DMA_FROM_DEVICE; in rdma_read_chunk_lcl()
137 ctxt->read_hdr = head; in rdma_read_chunk_lcl()
152 ctxt->sge[pno].addr = in rdma_read_chunk_lcl()
158 ctxt->sge[pno].addr); in rdma_read_chunk_lcl()
164 ctxt->sge[pno].lkey = xprt->sc_dma_lkey; in rdma_read_chunk_lcl()
165 ctxt->sge[pno].length = len; in rdma_read_chunk_lcl()
166 ctxt->count++; in rdma_read_chunk_lcl()
178 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); in rdma_read_chunk_lcl()
180 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); in rdma_read_chunk_lcl()
183 read_wr.wr.wr_id = (unsigned long)ctxt; in rdma_read_chunk_lcl()
185 ctxt->wr_op = read_wr.wr.opcode; in rdma_read_chunk_lcl()
189 read_wr.wr.sg_list = ctxt->sge; in rdma_read_chunk_lcl()
206 svc_rdma_unmap_dma(ctxt); in rdma_read_chunk_lcl()
207 svc_rdma_put_context(ctxt, 0); in rdma_read_chunk_lcl()
227 struct svc_rdma_op_ctxt *ctxt = svc_rdma_get_context(xprt); in rdma_read_chunk_frmr() local
236 ctxt->direction = DMA_FROM_DEVICE; in rdma_read_chunk_frmr()
237 ctxt->frmr = frmr; in rdma_read_chunk_frmr()
270 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); in rdma_read_chunk_frmr()
272 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); in rdma_read_chunk_frmr()
295 ctxt->sge[0].addr = frmr->mr->iova; in rdma_read_chunk_frmr()
296 ctxt->sge[0].lkey = frmr->mr->lkey; in rdma_read_chunk_frmr()
297 ctxt->sge[0].length = frmr->mr->length; in rdma_read_chunk_frmr()
298 ctxt->count = 1; in rdma_read_chunk_frmr()
299 ctxt->read_hdr = head; in rdma_read_chunk_frmr()
316 read_wr.wr.sg_list = ctxt->sge; in rdma_read_chunk_frmr()
320 read_wr.wr.wr_id = (unsigned long)ctxt; in rdma_read_chunk_frmr()
321 read_wr.wr.ex.invalidate_rkey = ctxt->frmr->mr->lkey; in rdma_read_chunk_frmr()
327 inv_wr.wr_id = (unsigned long)ctxt; in rdma_read_chunk_frmr()
332 ctxt->wr_op = read_wr.wr.opcode; in rdma_read_chunk_frmr()
351 svc_rdma_put_context(ctxt, 0); in rdma_read_chunk_frmr()
580 struct svc_rdma_op_ctxt *ctxt = NULL; in svc_rdma_recvfrom() local
589 ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, in svc_rdma_recvfrom()
592 list_del_init(&ctxt->dto_q); in svc_rdma_recvfrom()
594 return rdma_read_complete(rqstp, ctxt); in svc_rdma_recvfrom()
596 ctxt = list_entry(rdma_xprt->sc_rq_dto_q.next, in svc_rdma_recvfrom()
599 list_del_init(&ctxt->dto_q); in svc_rdma_recvfrom()
603 ctxt = NULL; in svc_rdma_recvfrom()
606 if (!ctxt) { in svc_rdma_recvfrom()
618 ctxt, rdma_xprt, rqstp, ctxt->wc_status); in svc_rdma_recvfrom()
622 rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len); in svc_rdma_recvfrom()
636 ret = rdma_read_chunks(rdma_xprt, rmsgp, rqstp, ctxt); in svc_rdma_recvfrom()
642 svc_rdma_put_context(ctxt, 1); in svc_rdma_recvfrom()
649 svc_rdma_put_context(ctxt, 0); in svc_rdma_recvfrom()
661 if (ctxt) in svc_rdma_recvfrom()
662 svc_rdma_put_context(ctxt, 1); in svc_rdma_recvfrom()