]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fail attempt to offload e-switch TC flows with egress upper devices
authorEli Britstein <elibr@mellanox.com>
Wed, 19 Dec 2018 07:24:58 +0000 (09:24 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 20 Dec 2018 13:06:01 +0000 (05:06 -0800)
commitb235e8724d5f9cfc23e96ffdd96fecb58fbbe5c7
tree653dbe8541316e64ec4b9932b0c3bdfdfd0fb83e
parentdfcc8b048e77b8afcfbc7ebdebfbd0c8a90a0557
net/mlx5e: Fail attempt to offload e-switch TC flows with egress upper devices

We use the switchdev parent HW id helper to identify if the mirred device
shares the same ASIC/port with the ingress device. This can get us wrong
in the presence of upper devices such as vlan or bridge set over the HW
devices (VF or uplink representors), b/c the switchdev ID is retrieved
recursively.

To fail offload attempts in such cases, we condition the check on the
egress device to have not only the same switchdev ID but also the relevant
mlx5 netdev ops.

Fixes: acfaf192c274 ('net/mlx5e: Add TC drop and mirred/redirect action parsing for SRIOV offloads')
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c