Commit 15a1b4be authored by Jason Gunthorpe's avatar Jason Gunthorpe

RDMA/uverbs: Do not pass ib_uverbs_file to ioctl methods

The uverbs_attr_bundle already contains this pointer, and most methods
don't actually need it. Get rid of the redundant function argument.
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
parent 7106a976
...@@ -125,8 +125,7 @@ struct uverbs_api_object { ...@@ -125,8 +125,7 @@ struct uverbs_api_object {
}; };
struct uverbs_api_ioctl_method { struct uverbs_api_ioctl_method {
int (__rcu *handler)(struct ib_uverbs_file *ufile, int(__rcu *handler)(struct uverbs_attr_bundle *attrs);
struct uverbs_attr_bundle *ctx);
DECLARE_BITMAP(attr_mandatory, UVERBS_API_ATTR_BKEY_LEN); DECLARE_BITMAP(attr_mandatory, UVERBS_API_ATTR_BKEY_LEN);
u16 bundle_size; u16 bundle_size;
u8 use_stack:1; u8 use_stack:1;
......
...@@ -404,8 +404,7 @@ static int uverbs_set_attr(struct bundle_priv *pbundle, ...@@ -404,8 +404,7 @@ static int uverbs_set_attr(struct bundle_priv *pbundle,
static int ib_uverbs_run_method(struct bundle_priv *pbundle, static int ib_uverbs_run_method(struct bundle_priv *pbundle,
unsigned int num_attrs) unsigned int num_attrs)
{ {
int (*handler)(struct ib_uverbs_file *ufile, int (*handler)(struct uverbs_attr_bundle *attrs);
struct uverbs_attr_bundle *ctx);
size_t uattrs_size = array_size(sizeof(*pbundle->uattrs), num_attrs); size_t uattrs_size = array_size(sizeof(*pbundle->uattrs), num_attrs);
unsigned int destroy_bkey = pbundle->method_elm->destroy_bkey; unsigned int destroy_bkey = pbundle->method_elm->destroy_bkey;
unsigned int i; unsigned int i;
...@@ -445,10 +444,10 @@ static int ib_uverbs_run_method(struct bundle_priv *pbundle, ...@@ -445,10 +444,10 @@ static int ib_uverbs_run_method(struct bundle_priv *pbundle,
return ret; return ret;
__clear_bit(destroy_bkey, pbundle->uobj_finalize); __clear_bit(destroy_bkey, pbundle->uobj_finalize);
ret = handler(pbundle->bundle.ufile, &pbundle->bundle); ret = handler(&pbundle->bundle);
uobj_put_destroy(destroy_attr->uobject); uobj_put_destroy(destroy_attr->uobject);
} else { } else {
ret = handler(pbundle->bundle.ufile, &pbundle->bundle); ret = handler(&pbundle->bundle);
} }
/* /*
......
...@@ -210,8 +210,7 @@ static int uverbs_hot_unplug_completion_event_file(struct ib_uobject *uobj, ...@@ -210,8 +210,7 @@ static int uverbs_hot_unplug_completion_event_file(struct ib_uobject *uobj,
return 0; return 0;
}; };
int uverbs_destroy_def_handler(struct ib_uverbs_file *file, int uverbs_destroy_def_handler(struct uverbs_attr_bundle *attrs)
struct uverbs_attr_bundle *attrs)
{ {
return 0; return 0;
} }
......
...@@ -48,7 +48,7 @@ static int uverbs_free_counters(struct ib_uobject *uobject, ...@@ -48,7 +48,7 @@ static int uverbs_free_counters(struct ib_uobject *uobject,
} }
static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)( static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject( struct ib_uobject *uobj = uverbs_attr_get_uobject(
attrs, UVERBS_ATTR_CREATE_COUNTERS_HANDLE); attrs, UVERBS_ATTR_CREATE_COUNTERS_HANDLE);
...@@ -82,7 +82,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)( ...@@ -82,7 +82,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)(
} }
static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_READ)( static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_READ)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_counters_read_attr read_attr = {}; struct ib_counters_read_attr read_attr = {};
const struct uverbs_attr *uattr; const struct uverbs_attr *uattr;
......
...@@ -58,7 +58,7 @@ static int uverbs_free_cq(struct ib_uobject *uobject, ...@@ -58,7 +58,7 @@ static int uverbs_free_cq(struct ib_uobject *uobject,
} }
static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)( static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_ucq_object *obj = container_of( struct ib_ucq_object *obj = container_of(
uverbs_attr_get_uobject(attrs, UVERBS_ATTR_CREATE_CQ_HANDLE), uverbs_attr_get_uobject(attrs, UVERBS_ATTR_CREATE_CQ_HANDLE),
...@@ -101,7 +101,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)( ...@@ -101,7 +101,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)(
uverbs_uobject_get(ev_file_uobj); uverbs_uobject_get(ev_file_uobj);
} }
if (attr.comp_vector >= file->device->num_comp_vectors) { if (attr.comp_vector >= attrs->ufile->device->num_comp_vectors) {
ret = -EINVAL; ret = -EINVAL;
goto err_event_file; goto err_event_file;
} }
...@@ -173,7 +173,7 @@ DECLARE_UVERBS_NAMED_METHOD( ...@@ -173,7 +173,7 @@ DECLARE_UVERBS_NAMED_METHOD(
UVERBS_ATTR_UHW()); UVERBS_ATTR_UHW());
static int UVERBS_HANDLER(UVERBS_METHOD_CQ_DESTROY)( static int UVERBS_HANDLER(UVERBS_METHOD_CQ_DESTROY)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = struct ib_uobject *uobj =
uverbs_attr_get_uobject(attrs, UVERBS_ATTR_DESTROY_CQ_HANDLE); uverbs_attr_get_uobject(attrs, UVERBS_ATTR_DESTROY_CQ_HANDLE);
......
...@@ -46,8 +46,7 @@ static int uverbs_free_dm(struct ib_uobject *uobject, ...@@ -46,8 +46,7 @@ static int uverbs_free_dm(struct ib_uobject *uobject,
return dm->device->dealloc_dm(dm); return dm->device->dealloc_dm(dm);
} }
static int static int UVERBS_HANDLER(UVERBS_METHOD_DM_ALLOC)(
UVERBS_HANDLER(UVERBS_METHOD_DM_ALLOC)(struct ib_uverbs_file *file,
struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_dm_alloc_attr attr = {}; struct ib_dm_alloc_attr attr = {};
......
...@@ -223,7 +223,6 @@ struct ib_flow_action_esp_attr { ...@@ -223,7 +223,6 @@ struct ib_flow_action_esp_attr {
#define ESP_LAST_SUPPORTED_FLAG IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW #define ESP_LAST_SUPPORTED_FLAG IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW
static int parse_flow_action_esp(struct ib_device *ib_dev, static int parse_flow_action_esp(struct ib_device *ib_dev,
struct ib_uverbs_file *file,
struct uverbs_attr_bundle *attrs, struct uverbs_attr_bundle *attrs,
struct ib_flow_action_esp_attr *esp_attr, struct ib_flow_action_esp_attr *esp_attr,
bool is_modify) bool is_modify)
...@@ -305,7 +304,7 @@ static int parse_flow_action_esp(struct ib_device *ib_dev, ...@@ -305,7 +304,7 @@ static int parse_flow_action_esp(struct ib_device *ib_dev,
} }
static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)( static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject( struct ib_uobject *uobj = uverbs_attr_get_uobject(
attrs, UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE); attrs, UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE);
...@@ -317,7 +316,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)( ...@@ -317,7 +316,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)(
if (!ib_dev->create_flow_action_esp) if (!ib_dev->create_flow_action_esp)
return -EOPNOTSUPP; return -EOPNOTSUPP;
ret = parse_flow_action_esp(ib_dev, file, attrs, &esp_attr, false); ret = parse_flow_action_esp(ib_dev, attrs, &esp_attr, false);
if (ret) if (ret)
return ret; return ret;
...@@ -333,7 +332,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)( ...@@ -333,7 +332,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)(
} }
static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY)( static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject( struct ib_uobject *uobj = uverbs_attr_get_uobject(
attrs, UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE); attrs, UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE);
...@@ -344,8 +343,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY)( ...@@ -344,8 +343,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY)(
if (!action->device->modify_flow_action_esp) if (!action->device->modify_flow_action_esp)
return -EOPNOTSUPP; return -EOPNOTSUPP;
ret = parse_flow_action_esp(action->device, file, attrs, &esp_attr, ret = parse_flow_action_esp(action->device, attrs, &esp_attr, true);
true);
if (ret) if (ret)
return ret; return ret;
......
...@@ -40,7 +40,7 @@ static int uverbs_free_mr(struct ib_uobject *uobject, ...@@ -40,7 +40,7 @@ static int uverbs_free_mr(struct ib_uobject *uobject,
} }
static int UVERBS_HANDLER(UVERBS_METHOD_DM_MR_REG)( static int UVERBS_HANDLER(UVERBS_METHOD_DM_MR_REG)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_dm_mr_attr attr = {}; struct ib_dm_mr_attr attr = {};
struct ib_uobject *uobj = struct ib_uobject *uobj =
......
...@@ -40,9 +40,10 @@ struct devx_umem_reg_cmd { ...@@ -40,9 +40,10 @@ struct devx_umem_reg_cmd {
u32 out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)]; u32 out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)];
}; };
static struct mlx5_ib_ucontext *devx_ufile2uctx(struct ib_uverbs_file *file) static struct mlx5_ib_ucontext *
devx_ufile2uctx(const struct uverbs_attr_bundle *attrs)
{ {
return to_mucontext(ib_uverbs_get_ucontext_file(file)); return to_mucontext(ib_uverbs_get_ucontext(attrs));
} }
int mlx5_ib_devx_create(struct mlx5_ib_dev *dev) int mlx5_ib_devx_create(struct mlx5_ib_dev *dev)
...@@ -603,7 +604,7 @@ static bool devx_is_general_cmd(void *in) ...@@ -603,7 +604,7 @@ static bool devx_is_general_cmd(void *in)
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct mlx5_ib_ucontext *c; struct mlx5_ib_ucontext *c;
struct mlx5_ib_dev *dev; struct mlx5_ib_dev *dev;
...@@ -616,7 +617,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)( ...@@ -616,7 +617,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)(
MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC)) MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC))
return -EFAULT; return -EFAULT;
c = devx_ufile2uctx(file); c = devx_ufile2uctx(attrs);
if (IS_ERR(c)) if (IS_ERR(c))
return PTR_ERR(c); return PTR_ERR(c);
dev = to_mdev(c->ibucontext.device); dev = to_mdev(c->ibucontext.device);
...@@ -653,14 +654,14 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)( ...@@ -653,14 +654,14 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)(
* queue or arm its CQ for event generation), no further harm is expected. * queue or arm its CQ for event generation), no further harm is expected.
*/ */
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_UAR)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_UAR)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct mlx5_ib_ucontext *c; struct mlx5_ib_ucontext *c;
struct mlx5_ib_dev *dev; struct mlx5_ib_dev *dev;
u32 user_idx; u32 user_idx;
s32 dev_idx; s32 dev_idx;
c = devx_ufile2uctx(file); c = devx_ufile2uctx(attrs);
if (IS_ERR(c)) if (IS_ERR(c))
return PTR_ERR(c); return PTR_ERR(c);
dev = to_mdev(c->ibucontext.device); dev = to_mdev(c->ibucontext.device);
...@@ -681,7 +682,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_UAR)( ...@@ -681,7 +682,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_UAR)(
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OTHER)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OTHER)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct mlx5_ib_ucontext *c; struct mlx5_ib_ucontext *c;
struct mlx5_ib_dev *dev; struct mlx5_ib_dev *dev;
...@@ -693,7 +694,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OTHER)( ...@@ -693,7 +694,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OTHER)(
int err; int err;
int uid; int uid;
c = devx_ufile2uctx(file); c = devx_ufile2uctx(attrs);
if (IS_ERR(c)) if (IS_ERR(c))
return PTR_ERR(c); return PTR_ERR(c);
dev = to_mdev(c->ibucontext.device); dev = to_mdev(c->ibucontext.device);
...@@ -908,7 +909,7 @@ static int devx_obj_cleanup(struct ib_uobject *uobject, ...@@ -908,7 +909,7 @@ static int devx_obj_cleanup(struct ib_uobject *uobject,
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN); void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN);
int cmd_out_len = uverbs_attr_get_len(attrs, int cmd_out_len = uverbs_attr_get_len(attrs,
...@@ -970,7 +971,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)( ...@@ -970,7 +971,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)(
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_MODIFY)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_MODIFY)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN); void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN);
int cmd_out_len = uverbs_attr_get_len(attrs, int cmd_out_len = uverbs_attr_get_len(attrs,
...@@ -1011,7 +1012,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_MODIFY)( ...@@ -1011,7 +1012,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_MODIFY)(
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_QUERY)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_QUERY)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN); void *cmd_in = uverbs_attr_get_alloced_ptr(attrs, MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN);
int cmd_out_len = uverbs_attr_get_len(attrs, int cmd_out_len = uverbs_attr_get_len(attrs,
...@@ -1125,7 +1126,7 @@ static void devx_umem_reg_cmd_build(struct mlx5_ib_dev *dev, ...@@ -1125,7 +1126,7 @@ static void devx_umem_reg_cmd_build(struct mlx5_ib_dev *dev,
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_UMEM_REG)( static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_UMEM_REG)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct devx_umem_reg_cmd cmd; struct devx_umem_reg_cmd cmd;
struct devx_umem *obj; struct devx_umem *obj;
......
...@@ -60,7 +60,7 @@ static const struct uverbs_attr_spec mlx5_ib_flow_type[] = { ...@@ -60,7 +60,7 @@ static const struct uverbs_attr_spec mlx5_ib_flow_type[] = {
#define MLX5_IB_CREATE_FLOW_MAX_FLOW_ACTIONS 2 #define MLX5_IB_CREATE_FLOW_MAX_FLOW_ACTIONS 2
static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)( static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct mlx5_flow_act flow_act = {.flow_tag = MLX5_FS_DEFAULT_FLOW_TAG}; struct mlx5_flow_act flow_act = {.flow_tag = MLX5_FS_DEFAULT_FLOW_TAG};
struct mlx5_ib_flow_handler *flow_handler; struct mlx5_ib_flow_handler *flow_handler;
...@@ -194,7 +194,7 @@ static int flow_matcher_cleanup(struct ib_uobject *uobject, ...@@ -194,7 +194,7 @@ static int flow_matcher_cleanup(struct ib_uobject *uobject,
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_MATCHER_CREATE)( static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_MATCHER_CREATE)(
struct ib_uverbs_file *file, struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject( struct ib_uobject *uobj = uverbs_attr_get_uobject(
attrs, MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE); attrs, MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE);
...@@ -313,7 +313,6 @@ static bool mlx5_ib_modify_header_supported(struct mlx5_ib_dev *dev) ...@@ -313,7 +313,6 @@ static bool mlx5_ib_modify_header_supported(struct mlx5_ib_dev *dev)
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)( static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)(
struct ib_uverbs_file *file,
struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject( struct ib_uobject *uobj = uverbs_attr_get_uobject(
...@@ -435,7 +434,6 @@ static int mlx5_ib_flow_action_create_packet_reformat_ctx( ...@@ -435,7 +434,6 @@ static int mlx5_ib_flow_action_create_packet_reformat_ctx(
} }
static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT)( static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT)(
struct ib_uverbs_file *file,
struct uverbs_attr_bundle *attrs) struct uverbs_attr_bundle *attrs)
{ {
struct ib_uobject *uobj = uverbs_attr_get_uobject(attrs, struct ib_uobject *uobj = uverbs_attr_get_uobject(attrs,
......
...@@ -4209,8 +4209,8 @@ void rdma_roce_rescan_device(struct ib_device *ibdev); ...@@ -4209,8 +4209,8 @@ void rdma_roce_rescan_device(struct ib_device *ibdev);
struct ib_ucontext *ib_uverbs_get_ucontext_file(struct ib_uverbs_file *ufile); struct ib_ucontext *ib_uverbs_get_ucontext_file(struct ib_uverbs_file *ufile);
int uverbs_destroy_def_handler(struct ib_uverbs_file *file,
struct uverbs_attr_bundle *attrs); int uverbs_destroy_def_handler(struct uverbs_attr_bundle *attrs);
struct net_device *rdma_alloc_netdev(struct ib_device *device, u8 port_num, struct net_device *rdma_alloc_netdev(struct ib_device *device, u8 port_num,
enum rdma_netdev_t type, const char *name, enum rdma_netdev_t type, const char *name,
......
...@@ -327,8 +327,7 @@ struct uverbs_method_def { ...@@ -327,8 +327,7 @@ struct uverbs_method_def {
u32 flags; u32 flags;
size_t num_attrs; size_t num_attrs;
const struct uverbs_attr_def * const (*attrs)[]; const struct uverbs_attr_def * const (*attrs)[];
int (*handler)(struct ib_uverbs_file *ufile, int (*handler)(struct uverbs_attr_bundle *attrs);
struct uverbs_attr_bundle *ctx);
}; };
struct uverbs_object_def { struct uverbs_object_def {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment