Skip to content

Commit 172c034

Browse files
Jianbo Liukuba-moo
authored andcommitted
net/mlx5e: TC, Continue the attr process even if encap entry is invalid
Previously the offload of the rule with header rewrite and mirror to both internal and external destinations is skipped if the encap entry is not valid. But it shouldn't because driver will try to offload it again if neighbor is updated and encap entry is valid, to replace the old FTE added for slow path. But the extra split attr doesn't exist at that time as the process is skipped, driver then fails to offload it. To fix this issue, remove the checking and continue the attr process if encap entry is invalid. Fixes: b11bde5 ("net/mlx5e: TC, Offload rewrite and mirror to both internal and external dests") Signed-off-by: Jianbo Liu <[email protected]> Reviewed-by: Cosmin Ratiu <[email protected]> Signed-off-by: Mark Bloch <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5d1a04f commit 172c034

File tree

1 file changed

+1
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,9 +1750,6 @@ extra_split_attr_dests_needed(struct mlx5e_tc_flow *flow, struct mlx5_flow_attr
17501750
!list_is_first(&attr->list, &flow->attrs))
17511751
return 0;
17521752

1753-
if (flow_flag_test(flow, SLOW))
1754-
return 0;
1755-
17561753
esw_attr = attr->esw_attr;
17571754
if (!esw_attr->split_count ||
17581755
esw_attr->split_count == esw_attr->out_count - 1)
@@ -1766,7 +1763,7 @@ extra_split_attr_dests_needed(struct mlx5e_tc_flow *flow, struct mlx5_flow_attr
17661763
for (i = esw_attr->split_count; i < esw_attr->out_count; i++) {
17671764
/* external dest with encap is considered as internal by firmware */
17681765
if (esw_attr->dests[i].vport == MLX5_VPORT_UPLINK &&
1769-
!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP_VALID))
1766+
!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP))
17701767
ext_dest = true;
17711768
else
17721769
int_dest = true;

0 commit comments

Comments
 (0)