mlxsw: spectrum_flower: Do not allow mixing HW stats types for actions

As there is one set of counters for the whole action chain, forbid to
mix the HW stats types.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2020-03-07 12:40:14 +01:00 коммит произвёл David S. Miller
Родитель 319a1d1947
Коммит 3632f6d390
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -26,6 +26,8 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
if (!flow_action_has_entries(flow_action))
return 0;
if (!flow_action_mixed_hw_stats_types_check(flow_action, extack))
return -EOPNOTSUPP;
/* Count action is inserted first */
err = mlxsw_sp_acl_rulei_act_count(mlxsw_sp, rulei, extack);