Commit 947e2585 authored by Yevgeny Kliteynik's avatar Yevgeny Kliteynik Committed by Saeed Mahameed

net/mlx5: DR, Support decap L3 action using pattern / arg mechanism

Use the new accelerated action for decap L3 on RX side:
use the mechanism of pattern and argument same as in
modify-header action.
Signed-off-by: default avatarErez Shitrit <erezsh@nvidia.com>
Signed-off-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: default avatarAlex Vesker <valex@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 62e40c85
...@@ -1428,23 +1428,12 @@ dr_action_create_reformat_action(struct mlx5dr_domain *dmn, ...@@ -1428,23 +1428,12 @@ dr_action_create_reformat_action(struct mlx5dr_domain *dmn,
return ret; return ret;
} }
action->rewrite->chunk = mlx5dr_icm_alloc_chunk(dmn->action_icm_pool, action->rewrite->data = hw_actions;
DR_CHUNK_SIZE_8); action->rewrite->dmn = dmn;
if (!action->rewrite->chunk) {
mlx5dr_dbg(dmn, "Failed allocating modify header chunk\n");
return -ENOMEM;
}
action->rewrite->data = (void *)hw_actions;
action->rewrite->index = (mlx5dr_icm_pool_get_chunk_icm_addr
(action->rewrite->chunk) -
dmn->info.caps.hdr_modify_icm_addr) /
DR_ACTION_CACHE_LINE_SIZE;
ret = mlx5dr_send_postsend_action(dmn, action); ret = mlx5dr_ste_alloc_modify_hdr(action);
if (ret) { if (ret) {
mlx5dr_dbg(dmn, "Writing decap l3 actions to ICM failed\n"); mlx5dr_dbg(dmn, "Failed preparing reformat data\n");
mlx5dr_icm_free_chunk(action->rewrite->chunk);
return ret; return ret;
} }
return 0; return 0;
...@@ -2161,7 +2150,7 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action) ...@@ -2161,7 +2150,7 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action)
refcount_dec(&action->reformat->dmn->refcount); refcount_dec(&action->reformat->dmn->refcount);
break; break;
case DR_ACTION_TYP_TNL_L3_TO_L2: case DR_ACTION_TYP_TNL_L3_TO_L2:
mlx5dr_icm_free_chunk(action->rewrite->chunk); mlx5dr_ste_free_modify_hdr(action);
refcount_dec(&action->rewrite->dmn->refcount); refcount_dec(&action->rewrite->dmn->refcount);
break; break;
case DR_ACTION_TYP_L2_TO_TNL_L2: case DR_ACTION_TYP_L2_TO_TNL_L2:
......
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