1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/infiniband/hw/mlx5
Jason Gunthorpe a665aca89a 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/6-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-09-11 10:24:53 -03:00
..
ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
cmd.c RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
cmd.h RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
cong.c RDMA/mlx5: Update mlx5_ib to use new cmd interface 2020-05-06 17:42:45 -03:00
counters.c RDMA: Make counters destroy symmetrical 2020-09-09 14:14:29 -03:00
counters.h RDMA/mlx5: Separate counters from main.c 2020-07-07 14:05:51 -03:00
cq.c RDMA: Allow fail of destroy CQ 2020-09-09 14:14:29 -03:00
devx.c RDMA 5.9 merge window pull request 2020-08-06 16:43:36 -07:00
devx.h RDMA/mlx5: Cleanup DEVX initialization flow 2020-07-07 14:05:51 -03:00
doorbell.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
fs.c RDMA/mlx5: Enable sniffer when device is in switchdev mode 2020-08-18 15:03:32 -03:00
fs.h RDMA/mlx5: Separate flow steering logic from main.c 2020-07-07 14:05:51 -03:00
gsi.c RDMA/mlx5: Set lag tx affinity according to slave 2020-05-02 20:19:54 -03:00
ib_rep.c IB/mlx5: Rename profile and init methods 2019-11-11 12:15:29 -08:00
ib_rep.h RDMA/mlx5: Assign profile before calling stages 2020-05-06 17:52:01 -03:00
ib_virt.c net/mlx5: Update vport.c to new cmd interface 2020-04-23 21:42:02 +03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mad.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
main.c RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
Makefile RDMA/mlx5: Separate flow steering logic from main.c 2020-07-07 14:05:51 -03:00
mem.c RDMA/umem: Split ib_umem_num_pages() into ib_umem_num_dma_blocks() 2020-09-11 10:24:53 -03:00
mlx5_ib.h RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
mr.c RDMA/mlx5: Replace open-coded offsetofend() macro 2020-08-18 14:47:34 -03:00
odp.c RDMA 5.9 merge window pull request 2020-08-06 16:43:36 -07:00
qos.c RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
qp.c RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
qp.h RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
qpc.c RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
restrack.c RDMA/mlx5: Separate restrack callbacks initialization from main.c 2020-07-07 14:05:51 -03:00
restrack.h RDMA/mlx5: Separate restrack callbacks initialization from main.c 2020-07-07 14:05:51 -03:00
srq.c RDMA: Restore ability to fail on SRQ destroy 2020-09-09 14:14:24 -03:00
srq.h RDMA: Restore ability to fail on SRQ destroy 2020-09-09 14:14:24 -03:00
srq_cmd.c RDMA: Restore ability to fail on SRQ destroy 2020-09-09 14:14:24 -03:00
std_types.c RDMA/mlx5: Introduce UAPI to query PD attributes 2020-07-06 19:50:34 -03:00
wr.c RDMA 5.9 merge window pull request 2020-08-06 16:43:36 -07:00
wr.h RDMA/mlx5: Move all WR logic from qp.c to separate file 2020-05-06 17:42:45 -03:00