Skip to content

Commit 297eaf5

Browse files
roidayanSaeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Allow goto earlier chain if FW supports it
Mellanox FW can support this if ignore_flow_level capability exists. Signed-off-by: Roi Dayan <[email protected]> Reviewed-by: Oz Shlomo <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 96e3268 commit 297eaf5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,8 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
35333533
NL_SET_ERR_MSG_MOD(extack, "Goto action is not supported");
35343534
return -EOPNOTSUPP;
35353535
}
3536-
if (dest_chain <= attr->chain) {
3536+
if (!mlx5_esw_chains_backwards_supported(esw) &&
3537+
dest_chain <= attr->chain) {
35373538
NL_SET_ERR_MSG(extack, "Goto earlier chain isn't supported");
35383539
return -EOPNOTSUPP;
35393540
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ bool mlx5_esw_chains_prios_supported(struct mlx5_eswitch *esw)
9797
return esw->fdb_table.flags & ESW_FDB_CHAINS_AND_PRIOS_SUPPORTED;
9898
}
9999

100+
bool mlx5_esw_chains_backwards_supported(struct mlx5_eswitch *esw)
101+
{
102+
return fdb_ignore_flow_level_supported(esw);
103+
}
104+
100105
u32 mlx5_esw_chains_get_chain_range(struct mlx5_eswitch *esw)
101106
{
102107
if (!mlx5_esw_chains_prios_supported(esw))

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
bool
88
mlx5_esw_chains_prios_supported(struct mlx5_eswitch *esw);
9+
bool
10+
mlx5_esw_chains_backwards_supported(struct mlx5_eswitch *esw);
911
u32
1012
mlx5_esw_chains_get_prio_range(struct mlx5_eswitch *esw);
1113
u32

0 commit comments

Comments
 (0)