Lines Matching refs:ctxt

55 	struct svc_rdma_rw_ctxt *ctxt;
59 ctxt = svc_rdma_next_ctxt(&rdma->sc_rw_ctxts);
60 if (ctxt) {
61 list_del(&ctxt->rw_list);
65 ctxt = kmalloc(struct_size(ctxt, rw_first_sgl, SG_CHUNK_SIZE),
67 if (!ctxt)
69 INIT_LIST_HEAD(&ctxt->rw_list);
72 ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl;
73 if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges,
74 ctxt->rw_sg_table.sgl,
77 return ctxt;
80 kfree(ctxt);
87 struct svc_rdma_rw_ctxt *ctxt)
89 sg_free_table_chained(&ctxt->rw_sg_table, SG_CHUNK_SIZE);
92 list_add(&ctxt->rw_list, &rdma->sc_rw_ctxts);
103 struct svc_rdma_rw_ctxt *ctxt;
105 while ((ctxt = svc_rdma_next_ctxt(&rdma->sc_rw_ctxts)) != NULL) {
106 list_del(&ctxt->rw_list);
107 kfree(ctxt);
114 * @ctxt: R/W context to prepare
123 struct svc_rdma_rw_ctxt *ctxt,
129 ret = rdma_rw_ctx_init(&ctxt->rw_ctx, rdma->sc_qp, rdma->sc_port_num,
130 ctxt->rw_sg_table.sgl, ctxt->rw_nents,
133 svc_rdma_put_rw_ctxt(rdma, ctxt);
134 trace_svcrdma_dma_map_rw_err(rdma, ctxt->rw_nents, ret);
176 struct svc_rdma_rw_ctxt *ctxt;
178 while ((ctxt = svc_rdma_next_ctxt(&cc->cc_rwctxts)) != NULL) {
179 list_del(&ctxt->rw_list);
181 rdma_rw_ctx_destroy(&ctxt->rw_ctx, rdma->sc_qp,
182 rdma->sc_port_num, ctxt->rw_sg_table.sgl,
183 ctxt->rw_nents, dir);
184 svc_rdma_put_rw_ctxt(rdma, ctxt);
350 struct svc_rdma_rw_ctxt *ctxt;
352 ctxt = list_entry(tmp, struct svc_rdma_rw_ctxt, rw_list);
353 first_wr = rdma_rw_ctx_wrs(&ctxt->rw_ctx, rdma->sc_qp,
391 struct svc_rdma_rw_ctxt *ctxt)
393 struct scatterlist *sg = ctxt->rw_sg_table.sgl;
398 ctxt->rw_nents = 1;
405 struct svc_rdma_rw_ctxt *ctxt)
417 sg = ctxt->rw_sg_table.sgl;
431 ctxt->rw_nents = sge_no;
441 struct svc_rdma_rw_ctxt *ctxt),
446 struct svc_rdma_rw_ctxt *ctxt;
463 ctxt = svc_rdma_get_rw_ctxt(rdma,
465 if (!ctxt)
468 constructor(info, write_len, ctxt);
469 ret = svc_rdma_rw_ctx_init(rdma, ctxt, offset, handle,
476 list_add(&ctxt->rw_list, &cc->cc_rwctxts);
635 struct svc_rdma_rw_ctxt *ctxt;
641 ctxt = svc_rdma_get_rw_ctxt(cc->cc_rdma, sge_no);
642 if (!ctxt)
644 ctxt->rw_nents = sge_no;
646 sg = ctxt->rw_sg_table.sgl;
647 for (sge_no = 0; sge_no < ctxt->rw_nents; sge_no++) {
673 ret = svc_rdma_rw_ctx_init(cc->cc_rdma, ctxt, offset, rkey,
678 list_add(&ctxt->rw_list, &cc->cc_rwctxts);