diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-12 22:59:50 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-22 11:57:32 -0700 |
commit | 0cbf432db405289216747a8d31d74bab2452337c (patch) | |
tree | ff3075888879f177c90e0a52bb31c1c5455938c0 /drivers/infiniband/core/rdma_core.h | |
parent | dfb631a187b9b04c066df60e28adf05334112ca6 (diff) | |
download | blackbird-op-linux-0cbf432db405289216747a8d31d74bab2452337c.tar.gz blackbird-op-linux-0cbf432db405289216747a8d31d74bab2452337c.zip |
RDMA/uverbs: Use a linear list to describe the compiled-in uapi
The 'tree' data structure is very hard to build at compile time, and this
makes it very limited. The new radix tree based compiler can handle a more
complex input language that does not require the compiler to perfectly
group everything into a neat tree structure.
Instead use a simple list to describe to input, where the list elements
can be of various different 'opcodes' instructing the radix compiler what
to do. Start out with opcodes chaining to other definition lists and
chaining to the existing 'tree' definition.
Replace the very top level of the 'object tree' with this list type and
get rid of struct uverbs_object_tree_def and DECLARE_UVERBS_OBJECT_TREE.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.h')
-rw-r--r-- | drivers/infiniband/core/rdma_core.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/core/rdma_core.h b/drivers/infiniband/core/rdma_core.h index 4886d2bba7c7..e39e9da1ff71 100644 --- a/drivers/infiniband/core/rdma_core.h +++ b/drivers/infiniband/core/rdma_core.h @@ -152,9 +152,8 @@ uapi_get_object(struct uverbs_api *uapi, u16 object_id) } char *uapi_key_format(char *S, unsigned int key); -struct uverbs_api *uverbs_alloc_api( - const struct uverbs_object_tree_def *const *driver_specs, - enum rdma_driver_id driver_id); +struct uverbs_api *uverbs_alloc_api(const struct uapi_definition *driver_def, + enum rdma_driver_id driver_id); void uverbs_disassociate_api_pre(struct ib_uverbs_device *uverbs_dev); void uverbs_disassociate_api(struct uverbs_api *uapi); void uverbs_destroy_api(struct uverbs_api *uapi); @@ -162,4 +161,6 @@ void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, unsigned int num_attrs); void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile); +extern const struct uapi_definition uverbs_def_obj_intf[]; + #endif /* RDMA_CORE_H */ |