]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5e: Skip ESN replay window setup for IPsec crypto offload
authorJianbo Liu <jianbol@nvidia.com>
Tue, 27 Jan 2026 08:52:41 +0000 (10:52 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Jan 2026 04:51:29 +0000 (20:51 -0800)
commit011be342dd24b5168a5dcf408b14c3babe503341
tree294fe54d4758899cb15529c08dd11b66ff112382
parenta8f930b7be7be3f18f14446df461e17137400407
net/mlx5e: Skip ESN replay window setup for IPsec crypto offload

Commit a5e400a985df ("net/mlx5e: Honor user choice of IPsec replay
window size") introduced logic to setup the ESN replay window size.
This logic is only valid for packet offload.

However, the check to skip this block only covered outbound offloads.
It was not skipped for crypto offload, causing it to fall through to
the new switch statement and trigger its WARN_ON default case (for
instance, if a window larger than 256 bits was configured).

Fix this by amending the condition to also skip the replay window
setup if the offload type is not XFRM_DEV_OFFLOAD_PACKET.

Fixes: a5e400a985df ("net/mlx5e: Honor user choice of IPsec replay window size")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1769503961-124173-5-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c