Lines Matching refs:ctxt
56 struct svc_rdma_rw_ctxt *ctxt;
63 ctxt = llist_entry(node, struct svc_rdma_rw_ctxt, rw_node);
65 ctxt = kmalloc_node(struct_size(ctxt, rw_first_sgl, SG_CHUNK_SIZE),
67 if (!ctxt)
70 INIT_LIST_HEAD(&ctxt->rw_list);
73 ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl;
74 if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges,
75 ctxt->rw_sg_table.sgl,
78 return ctxt;
81 kfree(ctxt);
87 static void __svc_rdma_put_rw_ctxt(struct svc_rdma_rw_ctxt *ctxt,
90 sg_free_table_chained(&ctxt->rw_sg_table, SG_CHUNK_SIZE);
91 llist_add(&ctxt->rw_node, list);
95 struct svc_rdma_rw_ctxt *ctxt)
97 __svc_rdma_put_rw_ctxt(ctxt, &rdma->sc_rw_ctxts);
107 struct svc_rdma_rw_ctxt *ctxt;
111 ctxt = llist_entry(node, struct svc_rdma_rw_ctxt, rw_node);
112 kfree(ctxt);
119 * @ctxt: R/W context to prepare
128 struct svc_rdma_rw_ctxt *ctxt,
134 ret = rdma_rw_ctx_init(&ctxt->rw_ctx, rdma->sc_qp, rdma->sc_port_num,
135 ctxt->rw_sg_table.sgl, ctxt->rw_nents,
138 svc_rdma_put_rw_ctxt(rdma, ctxt);
139 trace_svcrdma_dma_map_rw_err(rdma, ctxt->rw_nents, ret);
190 struct svc_rdma_rw_ctxt *ctxt;
196 while ((ctxt = svc_rdma_next_ctxt(&cc->cc_rwctxts)) != NULL) {
197 list_del(&ctxt->rw_list);
199 rdma_rw_ctx_destroy(&ctxt->rw_ctx, rdma->sc_qp,
200 rdma->sc_port_num, ctxt->rw_sg_table.sgl,
201 ctxt->rw_nents, dir);
202 __svc_rdma_put_rw_ctxt(ctxt, &free);
204 ctxt->rw_node.next = first;
205 first = &ctxt->rw_node;
380 struct svc_rdma_rw_ctxt *ctxt;
382 ctxt = list_entry(tmp, struct svc_rdma_rw_ctxt, rw_list);
383 first_wr = rdma_rw_ctx_wrs(&ctxt->rw_ctx, rdma->sc_qp,
422 struct svc_rdma_rw_ctxt *ctxt)
424 struct scatterlist *sg = ctxt->rw_sg_table.sgl;
429 ctxt->rw_nents = 1;
436 struct svc_rdma_rw_ctxt *ctxt)
448 sg = ctxt->rw_sg_table.sgl;
462 ctxt->rw_nents = sge_no;
472 struct svc_rdma_rw_ctxt *ctxt),
478 struct svc_rdma_rw_ctxt *ctxt;
492 ctxt = svc_rdma_get_rw_ctxt(rdma,
494 if (!ctxt)
497 constructor(info, write_len, ctxt);
499 ret = svc_rdma_rw_ctx_init(rdma, ctxt, offset, seg->rs_handle,
505 list_add(&ctxt->rw_list, &cc->cc_rwctxts);
712 struct svc_rdma_rw_ctxt *ctxt;
718 ctxt = svc_rdma_get_rw_ctxt(cc->cc_rdma, sge_no);
719 if (!ctxt)
721 ctxt->rw_nents = sge_no;
723 sg = ctxt->rw_sg_table.sgl;
724 for (sge_no = 0; sge_no < ctxt->rw_nents; sge_no++) {
748 ret = svc_rdma_rw_ctx_init(cc->cc_rdma, ctxt, segment->rs_offset,
754 list_add(&ctxt->rw_list, &cc->cc_rwctxts);