diff options
Diffstat (limited to 'include/rdma/uverbs_ioctl.h')
-rw-r--r-- | include/rdma/uverbs_ioctl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index f83f56329761..99130083615e 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -127,6 +127,22 @@ struct uverbs_root_spec { struct uverbs_object_spec_hash *object_buckets[0]; }; +/* + * ======================================= + * Verbs definitions + * ======================================= + */ + +struct uverbs_object_def { + const struct uverbs_obj_type *type_attrs; +}; + +#define _UVERBS_OBJECT(_id, _type_attrs, ...) \ + ((const struct uverbs_object_def) { \ + .type_attrs = _type_attrs}) +#define DECLARE_UVERBS_OBJECT(_name, _id, _type_attrs, ...) \ + const struct uverbs_object_def _name = \ + _UVERBS_OBJECT(_id, _type_attrs, ##__VA_ARGS__) /* ================================================= * Parsing infrastructure * ================================================= |