RDMA/uverbs: Use a linear list to describe the compiled-in uapi
authorJason Gunthorpe <jgg@mellanox.com>
Mon, 12 Nov 2018 20:59:50 +0000 (22:59 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 22 Nov 2018 18:57:32 +0000 (11:57 -0700)
commit0cbf432db405289216747a8d31d74bab2452337c
treeff3075888879f177c90e0a52bb31c1c5455938c0
parentdfb631a187b9b04c066df60e28adf05334112ca6
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>
12 files changed:
drivers/infiniband/core/rdma_core.h
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_std_types.c
drivers/infiniband/core/uverbs_uapi.c
drivers/infiniband/hw/mlx5/devx.c
drivers/infiniband/hw/mlx5/flow.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
include/rdma/ib_verbs.h
include/rdma/uverbs_ioctl.h
include/rdma/uverbs_named_ioctl.h
include/rdma/uverbs_std_types.h