]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7361715e9620555eff65f630b1ac0c527b752333
tree16c3da3c01e5a2d48cb375ab9f5a0eb341e95cf2
parent8e28b90b8a24a3e695c7da8b7541922b395f3f30
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