Skip to content

Commit 55b2ca7

Browse files
chumakdSaeed Mahameed
authored andcommitted
net/mlx5: Fix offloading with ESWITCH_IPV4_TTL_MODIFY_ENABLE
Only prio 1 is supported for nic mode when there is no ignore flow level support in firmware. But for switchdev mode, which supports fixed number of statically pre-allocated prios, this restriction is not relevant so it can be relaxed. Fixes: d671e10 ("net/mlx5: Fix tc max supported prio for nic mode") Signed-off-by: Dima Chumak <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 5623ef8 commit 55b2ca7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@ u32 mlx5_chains_get_nf_ft_chain(struct mlx5_fs_chains *chains)
121121

122122
u32 mlx5_chains_get_prio_range(struct mlx5_fs_chains *chains)
123123
{
124-
if (!mlx5_chains_prios_supported(chains))
125-
return 1;
126-
127124
if (mlx5_chains_ignore_flow_level_supported(chains))
128125
return UINT_MAX;
129126

127+
if (!chains->dev->priv.eswitch ||
128+
chains->dev->priv.eswitch->mode != MLX5_ESWITCH_OFFLOADS)
129+
return 1;
130+
130131
/* We should get here only for eswitch case */
131132
return FDB_TC_MAX_PRIO;
132133
}

0 commit comments

Comments
 (0)