RDMA/uverbs: Add generic function to fill in flow action object
Refactor the initialization of a flow action object to a common function. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
b4749bf256
commit
841eefc5cb
@@ -7,6 +7,7 @@
|
||||
#include <rdma/ib_verbs.h>
|
||||
#include <rdma/uverbs_types.h>
|
||||
#include <rdma/uverbs_ioctl.h>
|
||||
#include <rdma/uverbs_std_types.h>
|
||||
#include <rdma/mlx5_user_ioctl_cmds.h>
|
||||
#include <rdma/mlx5_user_ioctl_verbs.h>
|
||||
#include <rdma/ib_umem.h>
|
||||
@@ -279,11 +280,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)(
|
||||
if (IS_ERR(action))
|
||||
return PTR_ERR(action);
|
||||
|
||||
atomic_set(&action->usecnt, 0);
|
||||
action->device = uobj->context->device;
|
||||
action->type = IB_FLOW_ACTION_UNSPECIFIED;
|
||||
action->uobject = uobj;
|
||||
uobj->object = action;
|
||||
uverbs_flow_action_fill_action(action, uobj, uobj->context->device,
|
||||
IB_FLOW_ACTION_UNSPECIFIED);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user