#include <linux/file.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <rdma/uverbs_types.h>
#include <rdma/uverbs_std_types.h>
#include "rdma_core.h"
#include "uverbs.h"
#include "core_priv.h"
static int uverbs_response(struct uverbs_attr_bundle *attrs, const void *resp,
size_t resp_len)
{ … }
static int uverbs_request(struct uverbs_attr_bundle *attrs, void *req,
size_t req_len)
{ … }
static u32 uverbs_response_length(struct uverbs_attr_bundle *attrs,
size_t resp_len)
{ … }
struct uverbs_req_iter { … };
static int uverbs_request_start(struct uverbs_attr_bundle *attrs,
struct uverbs_req_iter *iter,
void *req,
size_t req_len)
{ … }
static int uverbs_request_next(struct uverbs_req_iter *iter, void *val,
size_t len)
{ … }
static const void __user *uverbs_request_next_ptr(struct uverbs_req_iter *iter,
size_t len)
{ … }
static int uverbs_request_finish(struct uverbs_req_iter *iter)
{ … }
struct ib_udata *uverbs_get_cleared_udata(struct uverbs_attr_bundle *attrs)
{ … }
static struct ib_uverbs_completion_event_file *
_ib_uverbs_lookup_comp_file(s32 fd, struct uverbs_attr_bundle *attrs)
{ … }
#define ib_uverbs_lookup_comp_file(_fd, _ufile) …
int ib_alloc_ucontext(struct uverbs_attr_bundle *attrs)
{ … }
int ib_init_ucontext(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_get_context(struct uverbs_attr_bundle *attrs)
{ … }
static void copy_query_dev_fields(struct ib_ucontext *ucontext,
struct ib_uverbs_query_device_resp *resp,
struct ib_device_attr *attr)
{ … }
static int ib_uverbs_query_device(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_query_port(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_alloc_pd(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_dealloc_pd(struct uverbs_attr_bundle *attrs)
{ … }
struct xrcd_table_entry { … };
static int xrcd_table_insert(struct ib_uverbs_device *dev,
struct inode *inode,
struct ib_xrcd *xrcd)
{ … }
static struct xrcd_table_entry *xrcd_table_search(struct ib_uverbs_device *dev,
struct inode *inode)
{ … }
static struct ib_xrcd *find_xrcd(struct ib_uverbs_device *dev, struct inode *inode)
{ … }
static void xrcd_table_delete(struct ib_uverbs_device *dev,
struct inode *inode)
{ … }
static int ib_uverbs_open_xrcd(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_close_xrcd(struct uverbs_attr_bundle *attrs)
{ … }
int ib_uverbs_dealloc_xrcd(struct ib_uobject *uobject, struct ib_xrcd *xrcd,
enum rdma_remove_reason why,
struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_dereg_mr(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_alloc_mw(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_dealloc_mw(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_create_comp_channel(struct uverbs_attr_bundle *attrs)
{ … }
static int create_cq(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_ex_create_cq *cmd)
{ … }
static int ib_uverbs_create_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_create_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int copy_wc_to_user(struct ib_device *ib_dev, void __user *dest,
struct ib_wc *wc)
{ … }
static int ib_uverbs_poll_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_req_notify_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_destroy_cq(struct uverbs_attr_bundle *attrs)
{ … }
static int create_qp(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_ex_create_qp *cmd)
{ … }
static int ib_uverbs_create_qp(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_create_qp(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_open_qp(struct uverbs_attr_bundle *attrs)
{ … }
static void copy_ah_attr_to_uverbs(struct ib_uverbs_qp_dest *uverb_attr,
struct rdma_ah_attr *rdma_attr)
{ … }
static int ib_uverbs_query_qp(struct uverbs_attr_bundle *attrs)
{ … }
static int modify_qp_mask(enum ib_qp_type qp_type, int mask)
{ … }
static void copy_ah_attr_from_uverbs(struct ib_device *dev,
struct rdma_ah_attr *rdma_attr,
struct ib_uverbs_qp_dest *uverb_attr)
{ … }
static int modify_qp(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_ex_modify_qp *cmd)
{ … }
static int ib_uverbs_modify_qp(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_modify_qp(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_destroy_qp(struct uverbs_attr_bundle *attrs)
{ … }
static void *alloc_wr(size_t wr_size, __u32 num_sge)
{ … }
static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
{ … }
static struct ib_recv_wr *
ib_uverbs_unmarshall_recv(struct uverbs_req_iter *iter, u32 wr_count,
u32 wqe_size, u32 sge_count)
{ … }
static int ib_uverbs_post_recv(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_post_srq_recv(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_create_ah(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_destroy_ah(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_attach_mcast(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_detach_mcast(struct uverbs_attr_bundle *attrs)
{ … }
struct ib_uflow_resources *flow_resources_alloc(size_t num_specs)
{ … }
EXPORT_SYMBOL(…);
void ib_uverbs_flow_resources_free(struct ib_uflow_resources *uflow_res)
{ … }
EXPORT_SYMBOL(…);
void flow_resources_add(struct ib_uflow_resources *uflow_res,
enum ib_flow_spec_type type,
void *ibobj)
{ … }
EXPORT_SYMBOL(…);
static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_flow_spec *kern_spec,
union ib_flow_spec *ib_spec,
struct ib_uflow_resources *uflow_res)
{ … }
static ssize_t spec_filter_size(const void *kern_spec_filter, u16 kern_filter_size,
u16 ib_real_filter_sz)
{ … }
int ib_uverbs_kern_spec_to_ib_spec_filter(enum ib_flow_spec_type type,
const void *kern_spec_mask,
const void *kern_spec_val,
size_t kern_filter_sz,
union ib_flow_spec *ib_spec)
{ … }
static int kern_spec_to_ib_spec_filter(struct ib_uverbs_flow_spec *kern_spec,
union ib_flow_spec *ib_spec)
{ … }
static int kern_spec_to_ib_spec(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_flow_spec *kern_spec,
union ib_flow_spec *ib_spec,
struct ib_uflow_resources *uflow_res)
{ … }
static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_destroy_wq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_modify_wq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_create_rwq_ind_table(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_destroy_rwq_ind_table(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_destroy_flow(struct uverbs_attr_bundle *attrs)
{ … }
static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,
struct ib_uverbs_create_xsrq *cmd,
struct ib_udata *udata)
{ … }
static int ib_uverbs_create_srq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_create_xsrq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_modify_srq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_query_srq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_destroy_srq(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_query_device(struct uverbs_attr_bundle *attrs)
{ … }
static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)
{ … }
#define UAPI_DEF_WRITE_IO(req, resp) …
#define UAPI_DEF_WRITE_I(req) …
#define UAPI_DEF_WRITE_UDATA_IO(req, resp) …
#define UAPI_DEF_WRITE_UDATA_I(req) …
#define UAPI_DEF_WRITE_IO_EX(req, req_last_member, resp, resp_last_member) …
#define UAPI_DEF_WRITE_I_EX(req, req_last_member) …
const struct uapi_definition uverbs_def_write_intf[] = …;