]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Term table handling of internal port rules
authorAriel Levkovich <lariel@nvidia.com>
Tue, 7 Sep 2021 20:30:59 +0000 (23:30 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 29 Oct 2021 20:53:31 +0000 (13:53 -0700)
commit1d2a6cf0034d5d493d7422399ae8c9a43836d407
tree4e392927a4fdd4440f3bfad35eade3add119e9c7
parentfa5d38f63735170e14aa65ec15df435a84ced7c6
net/mlx5e: Term table handling of internal port rules

Adjust termination table logic to handle rules which
involve internal port as filter or forwarding device.

For cases where the rule forwards from internal port
to uplink, always choose to go via termination table.
This is because it is not known from where the packet
originally arrived to the internal port and it is possible
that it came from the uplink itself, in which case
a term table is required to perform hairpin.
If the packet arrived from a vport, going via term
table has no effect.

For cases where the rule forwards to an internal port
from uplink the rep pointer will point to the uplink rep,
avoid going via termination table as it is not required.

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