Commit bc36c99a authored by Eli Britstein's avatar Eli Britstein Committed by Xie XiuQi
Browse files

net/mlx5e: Fail attempt to offload e-switch TC flows with egress upper devices



mainline inclusion
from mainline-5.0
commit a0646c88
category: bugfix
bugzilla: 6105
CVE: NA

-------------------------------------------------

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: 03a9d11e ('net/mlx5e: Add TC drop and mirred/redirect action parsing for SRIOV offloads')
Signed-off-by: default avatarEli Britstein <elibr@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>

Conflicts:
	drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
	drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Signed-off-by: default avatarKeefe LIU <liuqifa@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent ef17cdee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment