]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Offload internal port as encap route device
authorAriel Levkovich <lariel@nvidia.com>
Fri, 8 Jan 2021 20:03:48 +0000 (22:03 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 29 Oct 2021 20:53:30 +0000 (13:53 -0700)
commit987ca1dc49c98de3bed942aba9beaa654551f386
tree072cf7b15925d4f2ef086a8424766db15ba035cc
parent2fa4ad35f7b2b5eb486cc883cdca51250759cebf
net/mlx5e: Offload internal port as encap route device

When pefroming encap action, a route lookup is performed
to find the routing device the packet should be forwarded
to after the encapsulation. This is the device that has the
local tunnel ip address.

This change adds support to offload an encap rule where the
route device ends up being an ovs internal port.
In such case, the driver will add a HW rule that will encapsulate
the packet with the tunnel header and will overwrite the vport
metadata in reg_c0 to the internal port metadata value.
Finally, the packet will be forwarded to the root table to be
processed again with the indication that it came from an internal
port.

Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c