OSDN Git Service

mlxsw: spectrum_router: Relax GRE decap matching check
authorNir Dotan <nird@mellanox.com>
Thu, 6 Dec 2018 17:44:52 +0000 (17:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:52:30 +0000 (08:52 +0100)
commit6b1f6d02f0846290b15ed1fdb1ed06b6d9f819f7
tree9af720185bd25513dd3bc050ab8c8657431fde8a
parent24e9c85c6ea0c37015f39250ac07955000521ef4
mlxsw: spectrum_router: Relax GRE decap matching check

[ Upstream commit da93d2913fdf43d5cde3c5a53ac9cc29684d5c7c ]

GRE decap offload is configured when local routes prefix correspond to the
local address of one of the offloaded GRE tunnels. The matching check was
found to be too strict, such that for a flat GRE configuration, in which
the overlay and underlay traffic share the same non-default VRF, decap flow
was not offloaded.

Relax the check for decap flow offloading. A match occurs if the local
address of the tunnel matches the local route address while both share the
same VRF table.

Fixes: 4607f6d26950 ("mlxsw: spectrum_router: Support IPv4 underlay decap")
Signed-off-by: Nir Dotan <nird@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c