diff options
| author | Jason Gunthorpe <[email protected]> | 2020-09-04 19:41:47 -0300 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-09-11 10:24:53 -0300 |
| commit | a665aca89a411115e35ea937c2d3fb2ee4f5a701 (patch) | |
| tree | 79c8a3e6ba1b0df6d1cfe1e1067a40b72bc1f942 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 89603f7e7e5a6b719f1a163a05bd8a9231b58318 (diff) | |
RDMA/umem: Split ib_umem_num_pages() into ib_umem_num_dma_blocks()
ib_umem_num_pages() should only be used by things working with the SGL in
CPU pages directly.
Drivers building DMA lists should use the new ib_num_dma_blocks() which
returns the number of blocks rdma_umem_for_each_block() will return.
To make this general for DMA drivers requires a different implementation.
Computing DMA block count based on umem->address only works if the
requested page size is < PAGE_SIZE and/or the IOVA == umem->address.
Instead the number of DMA pages should be computed in the IOVA address
space, not umem->address. Thus the IOVA has to be stored inside the umem
so it can be used for these calculations.
For now set it to umem->address by default and fix it up if
ib_umem_find_best_pgsz() was called. This allows drivers to be converted
to ib_umem_num_dma_blocks() safely.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions