diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2018-11-26 09:28:34 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-04 21:46:41 +0300 |
commit | 04ca16cc198c2bd2fc51749123c118a284d1605e (patch) | |
tree | 0867450a445be4d2f4ae9934f4dbc5839a2ed1ed /include/rdma | |
parent | 4d7e8cc57429e1874658acbff98d3877c81cd0a4 (diff) | |
download | linux-04ca16cc198c2bd2fc51749123c118a284d1605e.tar.xz |
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/rdma')
-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 |