aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/nldev.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-06-13 21:38:19 -0300
committerDoug Ledford <dledford@redhat.com>2019-06-18 22:44:08 -0400
commit8f71bb0030b8816f57be142f95b3c7189c6eaf4c (patch)
treefc55bb9f34f8af9c06fe52c40ba1f18a0996ce7e /drivers/infiniband/core/nldev.c
parentRDMA: Add NLDEV_GET_CHARDEV to allow char dev discovery and autoload (diff)
downloadlinux-dev-8f71bb0030b8816f57be142f95b3c7189c6eaf4c.tar.xz
linux-dev-8f71bb0030b8816f57be142f95b3c7189c6eaf4c.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/core/nldev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 16b5d6d4dd1c..3cad72a609ff 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -126,6 +126,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
.len = 128 },
[RDMA_NLDEV_ATTR_CHARDEV_NAME] = { .type = NLA_NUL_STRING,
.len = RDMA_NLDEV_ATTR_ENTRY_STRLEN },
+ [RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID] = { .type = NLA_U32 },
};
static int put_driver_name_print_type(struct sk_buff *msg, const char *name,