RDMA/uverbs: Add helpers to mark uapi functions as unsupported
authorJason Gunthorpe <jgg@mellanox.com>
Mon, 12 Nov 2018 20:59:52 +0000 (22:59 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 22 Nov 2018 18:57:32 +0000 (11:57 -0700)
commit6829c1c2b371674a05562a39d608b5cf48351bea
tree637fbc743a57f244ff178cc11dc790175dd3f40a
parentc27f6aa8c9df7f3270d5f5f2957a2a024262eb99
RDMA/uverbs: Add helpers to mark uapi functions as unsupported

We have many cases where parts of the uapi are not supported in a driver,
needs a certain protocol, or whatever. It is best to reflect this directly
into the struct uverbs_api when it is built so that everything is simply
blocked off, and future introspection can report a proper supported list.

This is done by adding some additional helpers to the definition list
language that disable objects based on a 'supported' call back, and a
helper that disables based on a NULL struct ib_device function pointer.

Disablement is global. For instance, if a driver disables an object then
everything connected to that object is removed, including core methods.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/rdma_core.h
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_uapi.c
include/rdma/uverbs_ioctl.h