]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Support device memory type attribute
authorAriel Levkovich <lariel@mellanox.com>
Sun, 5 May 2019 14:07:11 +0000 (17:07 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 6 May 2019 15:51:50 +0000 (12:51 -0300)
commit7b177816dcbe3ec18c814f6ce298c9d6be6bffbb
treea61b9802139d47da545402adfc483ad2216eeb90
parentabbc8f8f95e7d775431b58994f52b813d79013f2
IB/mlx5: Support device memory type attribute

This patch intoruduces a new mlx5_ib driver attribute to the DM allocation
method - the DM type.

In order to allow addition of new types in downstream patches this patch
also refactors the allocation, deallocation and registration handlers to
consider the requested type and perform the necessary actions according to
it.

Since not all future device memory types will be such that are mapped to
user memory, the mandatory page index output attribute is modified to be
optional.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
include/uapi/rdma/mlx5_user_ioctl_cmds.h
include/uapi/rdma/mlx5_user_ioctl_verbs.h