aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types_flow_action.c
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2018-08-28 14:18:52 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-05 15:23:59 -0600
commit841eefc5cb57030ad05a0c4bc285f93ffa668ad9 (patch)
tree9a5a4891a03844f0c9ce533e720bafef0c7c4003 /drivers/infiniband/core/uverbs_std_types_flow_action.c
parentRDMA/mlx5: Add a new flow action verb - modify header (diff)
downloadlinux-dev-841eefc5cb57030ad05a0c4bc285f93ffa668ad9.tar.xz
linux-dev-841eefc5cb57030ad05a0c4bc285f93ffa668ad9.zip
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>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_flow_action.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types_flow_action.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_flow_action.c b/drivers/infiniband/core/uverbs_std_types_flow_action.c
index d8cfafe23bd9..cb9486ad5c67 100644
--- a/drivers/infiniband/core/uverbs_std_types_flow_action.c
+++ b/drivers/infiniband/core/uverbs_std_types_flow_action.c
@@ -326,11 +326,8 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)(
if (IS_ERR(action))
return PTR_ERR(action);
- atomic_set(&action->usecnt, 0);
- action->device = ib_dev;
- action->type = IB_FLOW_ACTION_ESP;
- action->uobject = uobj;
- uobj->object = action;
+ uverbs_flow_action_fill_action(action, uobj, ib_dev,
+ IB_FLOW_ACTION_ESP);
return 0;
}