OSDN Git Service

net/mlx5e: Specify out ifindex when looking up decap route
authorChris Mi <cmi@nvidia.com>
Tue, 26 Oct 2021 09:08:24 +0000 (17:08 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 17 Nov 2021 04:31:51 +0000 (20:31 -0800)
commit819c319c8c919307fa764ff02a228c06e727501c
treef116a573090ce02ff4f6930157e1bbff7efc8bb6
parentfc3a879aea35fba713ae2d0fd42f2f2e7eaac1d9
net/mlx5e: Specify out ifindex when looking up decap route

There is a use case that the local and remote VTEPs are in the same
host. Currently, the out ifindex is not specified when looking up the
decap route for offloads. So in this case, a local route is returned
and the route dev is lo.

Actual tunnel interface can be created with a parameter "dev" [1],
which specifies the physical device to use for tunnel endpoint
communication. Pass this parameter to driver when looking up decap
route for offloads. So that a unicast route will be returned.

[1] ip link add name vxlan1 type vxlan id 100 dev enp4s0f0 remote 1.1.1.1 dstport 4789

Signed-off-by: Chris Mi <cmi@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.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c