IB/mlx5: Unify ODP MR code paths to allow extra flexibility
authorArtemy Kovalyov <artemyko@mellanox.com>
Sun, 22 Dec 2019 12:46:47 +0000 (14:46 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 3 Jan 2020 21:00:13 +0000 (17:00 -0400)
commitcbe4b8f0a5766a40563876932cba6c9bf28eb98a
treec147c63d13be73964e2e7086d6c2842edb58e4d4
parent4ad6429d2713924afe10cd960535600b241560a3
IB/mlx5: Unify ODP MR code paths to allow extra flexibility

Building MR translation table in the ODP case requires additional
flexibility, namely random access to DMA addresses. Make both direct and
indirect ODP MR use same code path, separated from the non-ODP MR code
path.

With the restructuring the correct page_shift is now used around
__mlx5_ib_populate_pas().

Fixes: d2183c6f1958 ("RDMA/umem: Move page_shift from ib_umem to ib_odp_umem")
Link: https://lore.kernel.org/r/20191222124649.52300-2-leon@kernel.org
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mem.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/odp.c