]> git.baikalelectronics.ru Git - kernel.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)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 2 Feb 2022 04:59:42 +0000 (20:59 -0800)
commita7c3256fb53de16a09fcdf2c8c1692212db64027
treeb2fa5801305d520955418d3ad076671ad430849b
parent1889099a4e729b0ba84fc4ddb227d93be392bc09
net/mlx5e: IPsec: Fix crypto offload for non TCP/UDP encapsulated traffic

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: f76b91ff5d9a ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h