net/mlx5e: Reject tc rules which redirect from a VF to itself
authorAriel Levkovich <lariel@nvidia.com>
Thu, 11 Mar 2021 18:37:21 +0000 (20:37 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 2 Apr 2021 23:13:08 +0000 (16:13 -0700)
commitbb5696570b0b670dbbb45ed57dc246020b4e2a06
tree16c3da3c01e5a2d48cb375ab9f5a0eb341e95cf2
parent8802b8a44ef869d5985be817654373311212acfb
net/mlx5e: Reject tc rules which redirect from a VF to itself

Since there are self loopback prevention mechanisms at the
VF level, offloading such rules which redirect from a VF
to itself in the eswitch will break the datapath since the
packets will be dropped once they go back to the vport they
came from.

Therefore, offloading such rules will be rejected and left to
be handled by SW.

Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c