Commit 55130287 authored by Or Gerlitz's avatar Or Gerlitz Committed by David S. Miller
Browse files

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: aad7e08d

 ('net/mlx5e: Hardware offloaded flower filter statistics support')
Signed-off-by: default avatarOr Gerlitz <>
Signed-off-by: default avatarSaeed Mahameed <>
Signed-off-by: default avatarDavid S. Miller <>
parent a351a1b0
......@@ -62,7 +62,7 @@ static struct mlx5_flow_rule *mlx5e_tc_add_flow(struct mlx5e_priv *priv,
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment