Lines Matching refs:maction
143 int parse_flow_flow_action(struct mlx5_ib_flow_action *maction, in parse_flow_flow_action() argument
148 switch (maction->ib_action.type) { in parse_flow_flow_action()
154 action->esp_id = (uintptr_t)maction->esp_aes_gcm.ctx; in parse_flow_flow_action()
160 if (maction->flow_action_raw.sub_type == in parse_flow_flow_action()
166 maction->flow_action_raw.modify_hdr; in parse_flow_flow_action()
169 if (maction->flow_action_raw.sub_type == in parse_flow_flow_action()
176 if (maction->flow_action_raw.sub_type == in parse_flow_flow_action()
184 maction->flow_action_raw.pkt_reformat; in parse_flow_flow_action()
1657 struct mlx5_ib_flow_action *maction = to_mflow_act(action); in mlx5_ib_modify_flow_action_esp() local
1672 if (!(maction->esp_aes_gcm.ib_flags & in mlx5_ib_modify_flow_action_esp()
1678 memcpy(&accel_attrs, &maction->esp_aes_gcm.ctx->attrs, in mlx5_ib_modify_flow_action_esp()
1687 err = mlx5_accel_esp_modify_xfrm(maction->esp_aes_gcm.ctx, in mlx5_ib_modify_flow_action_esp()
1692 maction->esp_aes_gcm.ib_flags &= in mlx5_ib_modify_flow_action_esp()
1694 maction->esp_aes_gcm.ib_flags |= in mlx5_ib_modify_flow_action_esp()
1700 static void destroy_flow_action_raw(struct mlx5_ib_flow_action *maction) in destroy_flow_action_raw() argument
1702 switch (maction->flow_action_raw.sub_type) { in destroy_flow_action_raw()
1704 mlx5_modify_header_dealloc(maction->flow_action_raw.dev->mdev, in destroy_flow_action_raw()
1705 maction->flow_action_raw.modify_hdr); in destroy_flow_action_raw()
1708 mlx5_packet_reformat_dealloc(maction->flow_action_raw.dev->mdev, in destroy_flow_action_raw()
1709 maction->flow_action_raw.pkt_reformat); in destroy_flow_action_raw()
1720 struct mlx5_ib_flow_action *maction = to_mflow_act(action); in mlx5_ib_destroy_flow_action() local
1728 mlx5_accel_esp_destroy_xfrm(maction->esp_aes_gcm.ctx); in mlx5_ib_destroy_flow_action()
1731 destroy_flow_action_raw(maction); in mlx5_ib_destroy_flow_action()
1738 kfree(maction); in mlx5_ib_destroy_flow_action()
1997 struct mlx5_ib_flow_action *maction = in UVERBS_HANDLER() local
2000 ret = parse_flow_flow_action(maction, false, &flow_act); in UVERBS_HANDLER()
2154 struct mlx5_ib_flow_action *maction; in mlx5_ib_create_modify_header() local
2161 maction = kzalloc(sizeof(*maction), GFP_KERNEL); in mlx5_ib_create_modify_header()
2162 if (!maction) in mlx5_ib_create_modify_header()
2165 maction->flow_action_raw.modify_hdr = in mlx5_ib_create_modify_header()
2168 if (IS_ERR(maction->flow_action_raw.modify_hdr)) { in mlx5_ib_create_modify_header()
2169 ret = PTR_ERR(maction->flow_action_raw.modify_hdr); in mlx5_ib_create_modify_header()
2170 kfree(maction); in mlx5_ib_create_modify_header()
2173 maction->flow_action_raw.sub_type = in mlx5_ib_create_modify_header()
2175 maction->flow_action_raw.dev = dev; in mlx5_ib_create_modify_header()
2177 return &maction->ib_action; in mlx5_ib_create_modify_header()
2280 struct mlx5_ib_flow_action *maction, in mlx5_ib_flow_action_create_packet_reformat_ctx() argument
2296 maction->flow_action_raw.pkt_reformat = in mlx5_ib_flow_action_create_packet_reformat_ctx()
2299 if (IS_ERR(maction->flow_action_raw.pkt_reformat)) { in mlx5_ib_flow_action_create_packet_reformat_ctx()
2300 ret = PTR_ERR(maction->flow_action_raw.pkt_reformat); in mlx5_ib_flow_action_create_packet_reformat_ctx()
2304 maction->flow_action_raw.sub_type = in mlx5_ib_flow_action_create_packet_reformat_ctx()
2306 maction->flow_action_raw.dev = dev; in mlx5_ib_flow_action_create_packet_reformat_ctx()
2319 struct mlx5_ib_flow_action *maction; in UVERBS_HANDLER() local
2335 maction = kzalloc(sizeof(*maction), GFP_KERNEL); in UVERBS_HANDLER()
2336 if (!maction) in UVERBS_HANDLER()
2341 maction->flow_action_raw.sub_type = in UVERBS_HANDLER()
2343 maction->flow_action_raw.dev = mdev; in UVERBS_HANDLER()
2359 maction, ft_type, dv_prt, in, len); in UVERBS_HANDLER()
2364 uverbs_flow_action_fill_action(&maction->ib_action, uobj, &mdev->ib_dev, in UVERBS_HANDLER()
2369 kfree(maction); in UVERBS_HANDLER()