mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get()
authorGuillaume Nault <gnault@redhat.com>
Mon, 10 Jan 2022 13:43:14 +0000 (14:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:27 +0000 (11:05 +0100)
commit0cba6beb9645f482521192740aeed90367a21cf4
tree35d7f9f61308d5cd88774aba193fd55c01365014
parent6c923b0f74ae737ebc2e9d45c543b1babcde9212
mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get()

commit 48d67543e01d73292e0bb66d3f10fc422e79e031 upstream.

Mask the ECN bits before calling mlx5e_route_lookup_ipv4_get(). The
tunnel key might have the last ECN bit set. This interferes with the
route lookup process as ip_route_output_key_hash() interpretes this bit
specially (to restrict the route scope).

Found by code inspection, compile tested only.

Fixes: c7b9038d8af6 ("net/mlx5e: TC preparation refactoring for routing update event")
Fixes: 9a941117fb76 ("net/mlx5e: Maximize ip tunnel key usage on the TC offloading path")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c