#include <linux/file.h>
#include <linux/anon_inodes.h>
#include <linux/sched/mm.h>
#include <rdma/ib_verbs.h>
#include <rdma/uverbs_types.h>
#include <linux/rcupdate.h>
#include <rdma/uverbs_ioctl.h>
#include <rdma/rdma_user_ioctl.h>
#include "uverbs.h"
#include "core_priv.h"
#include "rdma_core.h"
static void uverbs_uobject_free(struct kref *ref)
{ … }
void uverbs_uobject_put(struct ib_uobject *uobject)
{ … }
EXPORT_SYMBOL(…);
static int uverbs_try_lock_object(struct ib_uobject *uobj,
enum rdma_lookup_mode mode)
{ … }
static void assert_uverbs_usecnt(struct ib_uobject *uobj,
enum rdma_lookup_mode mode)
{ … }
static int uverbs_destroy_uobject(struct ib_uobject *uobj,
enum rdma_remove_reason reason,
struct uverbs_attr_bundle *attrs)
{ … }
int uobj_destroy(struct ib_uobject *uobj, struct uverbs_attr_bundle *attrs)
{ … }
struct ib_uobject *__uobj_get_destroy(const struct uverbs_api_object *obj,
u32 id, struct uverbs_attr_bundle *attrs)
{ … }
int __uobj_perform_destroy(const struct uverbs_api_object *obj, u32 id,
struct uverbs_attr_bundle *attrs)
{ … }
static struct ib_uobject *alloc_uobj(struct uverbs_attr_bundle *attrs,
const struct uverbs_api_object *obj)
{ … }
static int idr_add_uobj(struct ib_uobject *uobj)
{ … }
static struct ib_uobject *
lookup_get_idr_uobject(const struct uverbs_api_object *obj,
struct ib_uverbs_file *ufile, s64 id,
enum rdma_lookup_mode mode)
{ … }
static struct ib_uobject *
lookup_get_fd_uobject(const struct uverbs_api_object *obj,
struct ib_uverbs_file *ufile, s64 id,
enum rdma_lookup_mode mode)
{ … }
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)
{ … }
static struct ib_uobject *
alloc_begin_idr_uobject(const struct uverbs_api_object *obj,
struct uverbs_attr_bundle *attrs)
{ … }
static struct ib_uobject *
alloc_begin_fd_uobject(const struct uverbs_api_object *obj,
struct uverbs_attr_bundle *attrs)
{ … }
struct ib_uobject *rdma_alloc_begin_uobject(const struct uverbs_api_object *obj,
struct uverbs_attr_bundle *attrs)
{ … }
static void alloc_abort_idr_uobject(struct ib_uobject *uobj)
{ … }
static int __must_check destroy_hw_idr_uobject(struct ib_uobject *uobj,
enum rdma_remove_reason why,
struct uverbs_attr_bundle *attrs)
{ … }
static void remove_handle_idr_uobject(struct ib_uobject *uobj)
{ … }
static void alloc_abort_fd_uobject(struct ib_uobject *uobj)
{ … }
static int __must_check destroy_hw_fd_uobject(struct ib_uobject *uobj,
enum rdma_remove_reason why,
struct uverbs_attr_bundle *attrs)
{ … }
static void remove_handle_fd_uobject(struct ib_uobject *uobj)
{ … }
static void alloc_commit_idr_uobject(struct ib_uobject *uobj)
{ … }
static void swap_idr_uobjects(struct ib_uobject *obj_old,
struct ib_uobject *obj_new)
{ … }
static void alloc_commit_fd_uobject(struct ib_uobject *uobj)
{ … }
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)
{ … }
void rdma_alloc_abort_uobject(struct ib_uobject *uobj,
struct uverbs_attr_bundle *attrs,
bool hw_obj_valid)
{ … }
static void lookup_put_idr_uobject(struct ib_uobject *uobj,
enum rdma_lookup_mode mode)
{ … }
static void lookup_put_fd_uobject(struct ib_uobject *uobj,
enum rdma_lookup_mode mode)
{ … }
void rdma_lookup_put_uobject(struct ib_uobject *uobj,
enum rdma_lookup_mode mode)
{ … }
void setup_ufile_idr_uobject(struct ib_uverbs_file *ufile)
{ … }
void release_ufile_idr_uobject(struct ib_uverbs_file *ufile)
{ … }
const struct uverbs_obj_type_class uverbs_idr_class = …;
EXPORT_SYMBOL(…);
int uverbs_uobject_fd_release(struct inode *inode, struct file *filp)
{ … }
EXPORT_SYMBOL(…);
static void ufile_destroy_ucontext(struct ib_uverbs_file *ufile,
enum rdma_remove_reason reason)
{ … }
static int __uverbs_cleanup_ufile(struct ib_uverbs_file *ufile,
enum rdma_remove_reason reason)
{ … }
void uverbs_destroy_ufile_hw(struct ib_uverbs_file *ufile,
enum rdma_remove_reason reason)
{ … }
const struct uverbs_obj_type_class uverbs_fd_class = …;
EXPORT_SYMBOL(…);
struct ib_uobject *
uverbs_get_uobject_from_file(u16 object_id, enum uverbs_obj_access access,
s64 id, struct uverbs_attr_bundle *attrs)
{ … }
void uverbs_finalize_object(struct ib_uobject *uobj,
enum uverbs_obj_access access, bool hw_obj_valid,
bool commit, struct uverbs_attr_bundle *attrs)
{ … }