aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlxsw
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-03-07 12:40:14 +0100
committerDavid S. Miller <davem@davemloft.net>2020-03-08 21:07:48 -0700
commit3632f6d390782880e5c5185f0b45057b41e14439 (patch)
tree95dde524c53ec16adb7c34b816a351e34e5c88bf /drivers/net/ethernet/mellanox/mlxsw
parentflow_offload: check for basic action hw stats type (diff)
downloadwireguard-linux-3632f6d390782880e5c5185f0b45057b41e14439.tar.xz
wireguard-linux-3632f6d390782880e5c5185f0b45057b41e14439.zip
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index 0011a71114e3..7435629c9e65 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -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);