net/mlx5e: Support IPsec acquire default SA
authorRaed Salem <raeds@nvidia.com>
Tue, 14 Mar 2023 08:58:42 +0000 (10:58 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 20 Mar 2023 09:29:45 +0000 (11:29 +0200)
commitaa8bd0c9518cc5902d88510bf007e451699221f2
treef27930fa244ef4575a56aa9dc1a77c17709f24f7
parentb3beba1fb404dd713a325cb241fe780857172225
net/mlx5e: Support IPsec acquire default SA

During XFRM stack acquire flow, a default SA is created to be updated
later, once acquire netlink message is handled in user space.

This SA is also passed to IPsec offload supporting driver, however this
SA acts only as placeholder and does not have context suitable for
offloading in HW yet. Identify this kind of SA by special offload flag
(XFRM_DEV_OFFLOAD_FLAG_ACQ), and create a SW only context.

In such cases with special mark so it won't be installed in HW in addition
flow and on remove/delete free this SW only context.

Signed-off-by: Raed Salem <raeds@nvidia.com>
Link: https://lore.kernel.org/r/8f36d6b61631dcd73fef0a0ac623456030bc9db0.1678714336.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c