]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Introduce ib_reg_user_mr
authorMoni Shoua <monis@mellanox.com>
Wed, 15 Jan 2020 12:43:32 +0000 (14:43 +0200)
committerLeon Romanovsky <leonro@mellanox.com>
Thu, 16 Jan 2020 14:14:36 +0000 (16:14 +0200)
commite36e84ea343c9780077ec4231efd552c924c9e31
tree3bac9bd2dd2756a60df3a798420008f3654c4216
parent41d3f13c35818410763ee212407159f6cddca4eb
IB/core: Introduce ib_reg_user_mr

Add ib_reg_user_mr() for kernel ULPs to register user MRs.

The common use case that uses this function is a userspace application
that allocates memory for HCA access but the responsibility to register
the memory at the HCA is on an kernel ULP. This ULP that acts as an agent
for the userspace application.

This function is intended to be used without a user context so vendor
drivers need to be aware of calling reg_user_mr() device operation with
udata equal to NULL.

Among all drivers, i40iw is the only driver which relies on presence
of udata, so check udata existence for that driver.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Guy Levi <guyle@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/efa/efa_verbs.c
drivers/infiniband/hw/i40iw/i40iw_verbs.c
include/rdma/ib_verbs.h