diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2018-11-26 07:28:34 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-04 19:46:41 +0100 |
commit | 04ca16cc198c2bd2fc51749123c118a284d1605e (patch) | |
tree | 0867450a445be4d2f4ae9934f4dbc5839a2ed1ed /include | |
parent | IB/core: Introduce UVERBS_IDR_ANY_OBJECT (diff) | |
download | linux-04ca16cc198c2bd2fc51749123c118a284d1605e.tar.xz linux-04ca16cc198c2bd2fc51749123c118a284d1605e.zip |
IB/core: Enable getting an object type from a given uobject
Enable getting an object type from a given uobject, the type is saved
upon tree merging and is returned as part of some helper function.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rdma/uverbs_std_types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/rdma/uverbs_std_types.h b/include/rdma/uverbs_std_types.h index df878ce02c94..883abcf6d36e 100644 --- a/include/rdma/uverbs_std_types.h +++ b/include/rdma/uverbs_std_types.h @@ -182,5 +182,17 @@ static inline void ib_set_flow(struct ib_uobject *uobj, struct ib_flow *ibflow, uflow->resources = uflow_res; } +struct uverbs_api_object { + const struct uverbs_obj_type *type_attrs; + const struct uverbs_obj_type_class *type_class; + u8 disabled:1; + u32 id; +}; + +static inline u32 uobj_get_object_id(struct ib_uobject *uobj) +{ + return uobj->uapi_object->id; +} + #endif |