]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: IPsec: Fix Software parser inner l3 type setting in case of encapsulation
authorRaed Salem <raeds@nvidia.com>
Wed, 17 Nov 2021 11:33:57 +0000 (13:33 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 1 Dec 2021 06:35:02 +0000 (22:35 -0800)
commit1f41aaa585eec4fe4c465e6cca6e33db0a9b6711
treeafd1500e106f6a942ec74869a1ac8723a74d1f64
parenta2bad4523091e76870430e456902f6737c886001
net/mlx5e: IPsec: Fix Software parser inner l3 type setting in case of encapsulation

Current code wrongly uses the skb->protocol field which reflects the
outer l3 protocol to set the inner l3 type in Software Parser (SWP)
fields settings in the ethernet segment (eseg) in flows where inner
l3 exists like in Vxlan over ESP flow, the above method wrongly use
the outer protocol type instead of the inner one. thus breaking cases
where inner and outer headers have different protocols.

Fix by setting the inner l3 type in SWP according to the inner l3 ip
header version.

Fixes: 5bf7324afe93 ("net/mlx5e: IPSec, Add Innova IPSec offload TX data path")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c