net/mlx5: Enable count action for rules with allow action
authorMichael Guralnik <michaelgur@mellanox.com>
Wed, 15 Jul 2020 04:28:35 +0000 (21:28 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 16 Jul 2020 05:21:29 +0000 (22:21 -0700)
Enable the creation of rules with allow and count actions.
This enables using counters on egress flow tables.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index e47a6698393564c13a3e64517d102beed6635972..644fe4c2f0fa0217ee2aedde12cd6c1dd1bfa4c3 100644 (file)
@@ -1598,6 +1598,7 @@ static struct mlx5_flow_handle *add_rule_fg(struct mlx5_flow_group *fg,
 static bool counter_is_valid(u32 action)
 {
        return (action & (MLX5_FLOW_CONTEXT_ACTION_DROP |
+                         MLX5_FLOW_CONTEXT_ACTION_ALLOW |
                          MLX5_FLOW_CONTEXT_ACTION_FWD_DEST));
 }