net/mlx5e: Check correct ip_version in decapsulation route resolution
authorRoi Dayan <roid@nvidia.com>
Tue, 2 Mar 2021 09:31:08 +0000 (11:31 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 10 Mar 2021 19:01:55 +0000 (11:01 -0800)
commit1e74152ed065ef491c30ccbbe119992e3e5200be
tree87be276ab5487cedaca51c1951adcbbd300daef8
parent55affa97d6758b6aeab0bc68f4884c4b5a6828af
net/mlx5e: Check correct ip_version in decapsulation route resolution

flow_attr->ip_version has the matching that should be done inner/outer.
When working with chains, decapsulation is done on chain0 and next chain
match on outer header which is the original inner which could be ipv4.
So in tunnel route resolution we cannot use that to know which ip version
we are at so save tun_ip_version when parsing the tunnel match and use
that.

Fixes: a508728a4c8b ("net/mlx5e: VF tunnel RX traffic offloading")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Dmytro Linkin <dlinkin@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.h