Commit 3632f6d3 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

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: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 319a1d19
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);