On Thu, May 07, 2020 at 03:59:09PM +0100, Edward Cree wrote: [...] > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > index 890b078851c9..1f0caeae24e1 100644 > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > @@ -30,14 +30,14 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp, > return -EOPNOTSUPP; > > act = flow_action_first_entry_get(flow_action); > - if (act->hw_stats == FLOW_ACTION_HW_STATS_ANY || > - act->hw_stats == FLOW_ACTION_HW_STATS_IMMEDIATE) { > + if (act->hw_stats & FLOW_ACTION_HW_STATS_DISABLED) { > + /* Nothing to do */ What if the driver does not support to disable counters? It will have to check for _DONT_CARE here. And _DISABLED implies "bail out if you cannot disable". You cannot assume _DISABLE != _DONT_CARE, it's the driver that decides this.