IB/core: Declare an object instead of declaring only type attributes
Switch all uverbs_type_attrs_xxxx with DECLARE_UVERBS_OBJECT macros. This will be later used in order to embed the object specific methods in the objects as well. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
fac9658cab
commit
5009010fbf
@@ -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
|
||||
* =================================================
|
||||
|
Reference in New Issue
Block a user