Lines Matching refs:sg_cnt

92 		u32 sg_cnt, u32 offset)  in rdma_rw_init_one_mr()  argument
96 u32 nents = min(sg_cnt, pages_per_mr); in rdma_rw_init_one_mr()
124 u32 port_num, struct scatterlist *sg, u32 sg_cnt, u32 offset, in rdma_rw_init_mr_wrs() argument
132 ctx->nr_ops = DIV_ROUND_UP(sg_cnt, pages_per_mr); in rdma_rw_init_mr_wrs()
141 u32 nents = min(sg_cnt, pages_per_mr); in rdma_rw_init_mr_wrs()
143 ret = rdma_rw_init_one_mr(qp, port_num, reg, sg, sg_cnt, in rdma_rw_init_mr_wrs()
173 sg_cnt -= nents; in rdma_rw_init_mr_wrs()
195 struct scatterlist *sg, u32 sg_cnt, u32 offset, in rdma_rw_init_map_wrs() argument
203 ctx->nr_ops = DIV_ROUND_UP(sg_cnt, max_sge); in rdma_rw_init_map_wrs()
205 ctx->map.sges = sge = kcalloc(sg_cnt, sizeof(*sge), GFP_KERNEL); in rdma_rw_init_map_wrs()
215 u32 nr_sge = min(sg_cnt, max_sge); in rdma_rw_init_map_wrs()
233 sg_cnt--; in rdma_rw_init_map_wrs()
277 u32 sg_cnt, enum dma_data_direction dir) in rdma_rw_unmap_sg() argument
280 pci_p2pdma_unmap_sg(dev->dma_device, sg, sg_cnt, dir); in rdma_rw_unmap_sg()
282 ib_dma_unmap_sg(dev, sg, sg_cnt, dir); in rdma_rw_unmap_sg()
319 struct scatterlist *sg, u32 sg_cnt, u32 sg_offset, in rdma_rw_ctx_init() argument
325 .orig_nents = sg_cnt, in rdma_rw_ctx_init()
332 sg_cnt = sgt.nents; in rdma_rw_ctx_init()
345 sg_cnt--; in rdma_rw_ctx_init()
349 if (WARN_ON_ONCE(sg_cnt == 0)) in rdma_rw_ctx_init()
352 if (rdma_rw_io_needs_mr(qp->device, port_num, dir, sg_cnt)) { in rdma_rw_ctx_init()
353 ret = rdma_rw_init_mr_wrs(ctx, qp, port_num, sg, sg_cnt, in rdma_rw_ctx_init()
355 } else if (sg_cnt > 1) { in rdma_rw_ctx_init()
356 ret = rdma_rw_init_map_wrs(ctx, qp, sg, sg_cnt, sg_offset, in rdma_rw_ctx_init()
391 u32 port_num, struct scatterlist *sg, u32 sg_cnt, in rdma_rw_ctx_signature_init() argument
401 .orig_nents = sg_cnt, in rdma_rw_ctx_signature_init()
410 if (sg_cnt > pages_per_mr || prot_sg_cnt > pages_per_mr) { in rdma_rw_ctx_signature_init()
412 sg_cnt, prot_sg_cnt, pages_per_mr); in rdma_rw_ctx_signature_init()
601 u32 port_num, struct scatterlist *sg, u32 sg_cnt, in rdma_rw_ctx_destroy() argument
623 rdma_rw_unmap_sg(qp->pd->device, sg, sg_cnt, dir); in rdma_rw_ctx_destroy()
640 u32 port_num, struct scatterlist *sg, u32 sg_cnt, in rdma_rw_ctx_destroy_signature() argument
652 rdma_rw_unmap_sg(qp->pd->device, sg, sg_cnt, dir); in rdma_rw_ctx_destroy_signature()