diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-14 02:38:19 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-06-19 04:44:08 +0200 |
commit | 8f71bb0030b8816f57be142f95b3c7189c6eaf4c (patch) | |
tree | fc55bb9f34f8af9c06fe52c40ba1f18a0996ce7e /include | |
parent | RDMA: Add NLDEV_GET_CHARDEV to allow char dev discovery and autoload (diff) | |
download | linux-8f71bb0030b8816f57be142f95b3c7189c6eaf4c.tar.xz linux-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 'include')
-rw-r--r-- | include/rdma/ib_verbs.h | 1 | ||||
-rw-r--r-- | include/uapi/rdma/rdma_netlink.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index a1265e9ce2d1..6f09fcc21d7a 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2321,6 +2321,7 @@ struct ib_device_ops { struct module *owner; enum rdma_driver_id driver_id; u32 uverbs_abi_ver; + unsigned int uverbs_no_driver_id_binding:1; int (*post_send)(struct ib_qp *qp, const struct ib_send_wr *send_wr, const struct ib_send_wr **bad_send_wr); diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h index 9903db21a42c..b27c02185dcc 100644 --- a/include/uapi/rdma/rdma_netlink.h +++ b/include/uapi/rdma/rdma_netlink.h @@ -504,6 +504,7 @@ enum rdma_nldev_attr { RDMA_NLDEV_ATTR_CHARDEV_NAME, /* string */ RDMA_NLDEV_ATTR_CHARDEV_ABI, /* u64 */ RDMA_NLDEV_ATTR_CHARDEV, /* u64 */ + RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID, /* u64 */ /* * Always the end |