#ifndef _UVERBS_TYPES_
#define _UVERBS_TYPES_
#include <linux/kernel.h>
#include <rdma/ib_verbs.h>
struct uverbs_obj_type;
struct uverbs_api_object;
enum rdma_lookup_mode { … };
struct uverbs_obj_type_class { … };
struct uverbs_obj_type { … };
struct uverbs_obj_idr_type { … };
struct ib_uobject *rdma_lookup_get_uobject(const struct uverbs_api_object *obj,
struct ib_uverbs_file *ufile, s64 id,
enum rdma_lookup_mode mode,
struct uverbs_attr_bundle *attrs);
void rdma_lookup_put_uobject(struct ib_uobject *uobj,
enum rdma_lookup_mode mode);
struct ib_uobject *rdma_alloc_begin_uobject(const struct uverbs_api_object *obj,
struct uverbs_attr_bundle *attrs);
void rdma_alloc_abort_uobject(struct ib_uobject *uobj,
struct uverbs_attr_bundle *attrs,
bool hw_obj_valid);
void rdma_alloc_commit_uobject(struct ib_uobject *uobj,
struct uverbs_attr_bundle *attrs);
void rdma_assign_uobject(struct ib_uobject *to_uobj,
struct ib_uobject *new_uobj,
struct uverbs_attr_bundle *attrs);
static inline void uverbs_uobject_get(struct ib_uobject *uobject)
{ … }
void uverbs_uobject_put(struct ib_uobject *uobject);
struct uverbs_obj_fd_type { … };
extern const struct uverbs_obj_type_class uverbs_idr_class;
extern const struct uverbs_obj_type_class uverbs_fd_class;
int uverbs_uobject_fd_release(struct inode *inode, struct file *filp);
#define UVERBS_BUILD_BUG_ON(cond) …
#define UVERBS_TYPE_ALLOC_FD(_obj_size, _destroy_object, _fops, _name, _flags) …
#define UVERBS_TYPE_ALLOC_IDR_SZ(_size, _destroy_object) …
#define UVERBS_TYPE_ALLOC_IDR(_destroy_object) …
#endif