]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: IPsec: Fix crypto offload for non TCP/UDP encapsulated traffic
authorRaed Salem <raeds@nvidia.com>
Thu, 2 Dec 2021 15:43:50 +0000 (17:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Feb 2022 11:39:55 +0000 (12:39 +0100)
commit95dde75d5207a66f18e6e7e0b995c152579dd7fe
tree512d603fbee6e7d07d78db5bd671e702c3f500e8
parent41332593b54910ac145142e4c86894c785f9c840
net/mlx5e: IPsec: Fix crypto offload for non TCP/UDP encapsulated traffic

commit 5352859b3bfa0ca188b2f1d2c1436fddc781e3b6 upstream.

IPsec crypto offload always set the ethernet segment checksum flags with
the inner L4 header checksum flag enabled for encapsulated IPsec offloaded
packet regardless of the encapsulated L4 header type, and even if it
doesn't exists in the first place, this breaks non TCP/UDP traffic as
such.

Set the inner L4 checksum flag only when the encapsulated L4 header
protocol is TCP/UDP using software parser swp_inner_l4_offset field as
indication.

Fixes: 5cfb540ef27b ("net/mlx5e: Set IPsec WAs only in IP's non checksum partial case.")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h