]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Create mmap database and cookie helper functions
authorMichal Kalderon <michal.kalderon@marvell.com>
Wed, 30 Oct 2019 09:44:11 +0000 (11:44 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 6 Nov 2019 17:08:00 +0000 (13:08 -0400)
commit7adcebdf217aa313b91644f95d52a0da0593626a
tree2c5234ba44b6a69e48e83bf407828ce33966d9ab
parentee5140054a055c0947753b029fa116921bd9a008
RDMA/core: Create mmap database and cookie helper functions

Create some common API's for adding entries to a xa_mmap. Searching for
an entry and freeing one.

The general approach is copied from the EFA driver and improved to be more
general and do more to help the drivers. Integration with the core allows
a reference counted scheme with a free function so that the driver can
know when its mmaps are all gone.

This significant new functionality will be helpful for drivers to have the
correct lifetime model for mmap objects.

Link: https://lore.kernel.org/r/20191030094417.16866-3-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c
drivers/infiniband/core/ib_core_uverbs.c
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h