RDMA: Report available cdevs through RDMA_NLDEV_CMD_GET_CHARDEV

Update the struct ib_client for all modules exporting cdevs related to the
ibdevice to also implement RDMA_NLDEV_CMD_GET_CHARDEV. All cdevs are now
autoloadable and discoverable by userspace over netlink instead of relying
on sysfs.

uverbs also exposes the DRIVER_ID for drivers that are able to support
driver id binding in rdma-core.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Jason Gunthorpe
2019-06-13 21:38:19 -03:00
committed by Doug Ledford
parent 0e2d00eb6f
commit 8f71bb0030
10 changed files with 110 additions and 5 deletions

View File

@@ -1147,6 +1147,7 @@ static const struct ib_device_ops mthca_dev_ops = {
.owner = THIS_MODULE,
.driver_id = RDMA_DRIVER_MTHCA,
.uverbs_abi_ver = MTHCA_UVERBS_ABI_VERSION,
.uverbs_no_driver_id_binding = 1,
.alloc_pd = mthca_alloc_pd,
.alloc_ucontext = mthca_alloc_ucontext,