]> git.ipfire.org Git - thirdparty/linux.git/commit - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
net/mlx5e: Ignore attempts to offload multiple times a TC flow
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 10 Apr 2018 16:24:51 +0000 (19:24 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 18 May 2018 00:48:54 +0000 (17:48 -0700)
commit8f8ae8953fb34ac01723f1dae5b231f64a3c526b
tree4381dfbfe8847abc1f285c687c70f5abdca58a4f
parent655dc3d2b91bf241f5baca5eb2bc2b1e22a561ff
net/mlx5e: Ignore attempts to offload multiple times a TC flow

For VF->VF and uplink->VF rules, the TC core (cls_api) attempts
to offload the same flow multiple times into the driver, b/c we
registered to the egdev callback.

Use the flow cookie to ignore attempts to add such flows, we can't
reject them (return error), b/c this will fail the offload attempt,
so we ignore that. We indentify wrong stat/del calls using the flow
ingress/egress flags, here we do return error to the core.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c