net/mlx5e: Remove redundant cap check for flow counter
authorRoi Dayan <roid@nvidia.com>
Sun, 25 Jul 2021 13:04:00 +0000 (16:04 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 3 Aug 2021 02:26:28 +0000 (19:26 -0700)
The cap is very old and today will always exists.
The cap is not being checked anywhere else. Remove the check from
drop action when parsing tc rules in nic mode.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index f4f8a67..3453f37 100644 (file)
@@ -3356,10 +3356,8 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv,
                                  MLX5_FLOW_CONTEXT_ACTION_COUNT;
                        break;
                case FLOW_ACTION_DROP:
-                       action |= MLX5_FLOW_CONTEXT_ACTION_DROP;
-                       if (MLX5_CAP_FLOWTABLE(priv->mdev,
-                                              flow_table_properties_nic_receive.flow_counter))
-                               action |= MLX5_FLOW_CONTEXT_ACTION_COUNT;
+                       action |= MLX5_FLOW_CONTEXT_ACTION_DROP |
+                                 MLX5_FLOW_CONTEXT_ACTION_COUNT;
                        break;
                case FLOW_ACTION_MANGLE:
                case FLOW_ACTION_ADD: