Commit 515ce2ff authored by Yevgeny Kliteynik's avatar Yevgeny Kliteynik Committed by Saeed Mahameed

net/mlx5: DR, init_next_match only if needed

Allocate next steering table entry only if the remaining space requires to.
Signed-off-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 5dde00a7
...@@ -586,9 +586,11 @@ static void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn, ...@@ -586,9 +586,11 @@ static void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn,
} else if (action_type_set[DR_ACTION_TYP_L2_TO_TNL_L3]) { } else if (action_type_set[DR_ACTION_TYP_L2_TO_TNL_L3]) {
u8 *d_action; u8 *d_action;
dr_ste_v1_arr_init_next_match(&last_ste, added_stes, attr->gvmi); if (action_sz < DR_STE_ACTION_TRIPLE_SZ) {
action = MLX5_ADDR_OF(ste_mask_and_match_v1, last_ste, action); dr_ste_v1_arr_init_next_match(&last_ste, added_stes, attr->gvmi);
action_sz = DR_STE_ACTION_TRIPLE_SZ; action = MLX5_ADDR_OF(ste_mask_and_match_v1, last_ste, action);
action_sz = DR_STE_ACTION_TRIPLE_SZ;
}
d_action = action + DR_STE_ACTION_SINGLE_SZ; d_action = action + DR_STE_ACTION_SINGLE_SZ;
dr_ste_v1_set_encap_l3(last_ste, dr_ste_v1_set_encap_l3(last_ste,
......
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