aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2016-07-14 10:32:39 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-14 13:34:28 -0700
commit55130287875c96b1e4669ee9713621e7d7f055b2 (patch)
tree95b6535cd91a285ebcd90c9b2124ce323fea0d55 /drivers
parentnet/mlx5: Introduce bulk reading of flow counters (diff)
downloadlinux-dev-55130287875c96b1e4669ee9713621e7d7f055b2.tar.xz
linux-dev-55130287875c96b1e4669ee9713621e7d7f055b2.zip
net/mlx5e: Offload TC flow counters only when supported
Currenly, the code that programs the flow actions into the firmware doesn't check if was actually asked to offload the statistics, fix that. Fixes: aad7e08d39bd ('net/mlx5e: Hardware offloaded flower filter statistics support') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 3261e8b1286e..cd58fc8f9174 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -62,7 +62,7 @@ static struct mlx5_flow_rule *mlx5e_tc_add_flow(struct mlx5e_priv *priv,
if (action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) {
dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
dest.ft = priv->fs.vlan.ft.t;
- } else {
+ } else if (action & MLX5_FLOW_CONTEXT_ACTION_COUNT) {
counter = mlx5_fc_create(dev, true);
if (IS_ERR(counter))
return ERR_CAST(counter);