]> asedeno.scripts.mit.edu Git - linux.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)
commit3411f9f01b76bd88aa6e0e013847ab6479cb4f24
tree2c5234ba44b6a69e48e83bf407828ce33966d9ab
parentb86deba977a91aaa5a4b725d7b42970e6de28d2c
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