net/mlx5e: Tidy up IPsec NAT-T SA discovery
authorLeon Romanovsky <leonro@nvidia.com>
Sun, 12 Nov 2023 11:50:00 +0000 (13:50 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 5 Dec 2023 06:11:52 +0000 (22:11 -0800)
commitc2bf84f1d1a1595dcc45fe867f0e02b331993fee
treeff80f6355482a44a97340a48ca7b958966a46f7a
parentdddb49b63d8683be81cff220b94a0196c1367b74
net/mlx5e: Tidy up IPsec NAT-T SA discovery

IPsec NAT-T packets are UDP encapsulated packets over ESP normal ones.
In case they arrive to RX, the SPI and ESP are located in inner header,
while the check was performed on outer header instead.

That wrong check caused to the situation where received rekeying request
was missed and caused to rekey timeout, which "compensated" this failure
by completing rekeying.

Fixes: d65954934937 ("net/mlx5e: Support IPsec NAT-T functionality")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
include/linux/mlx5/mlx5_ifc.h