diff options
author | Raed Salem <raeds@nvidia.com> | 2023-03-14 09:58:39 +0100 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-03-20 10:29:33 +0100 |
commit | e0aeb9b90acf6ee7c2d11141522ffbb5481734d3 (patch) | |
tree | d4f08a4240018951f1ab15e6519e8af6e6ec8b97 /net/xfrm | |
parent | net/mlx5e: Use chains for IPsec policy priority offload (diff) | |
download | linux-e0aeb9b90acf6ee7c2d11141522ffbb5481734d3.tar.xz linux-e0aeb9b90acf6ee7c2d11141522ffbb5481734d3.zip |
xfrm: add new device offload acquire flag
During XFRM acquire flow, a default SA is created to be updated later,
once acquire netlink message is handled in user space. When the relevant
policy is offloaded this default SA is also offloaded to IPsec offload
supporting driver, however this SA does not have context suitable for
offloading in HW, nor is interesting to offload to HW, consequently needs
a special driver handling apart from other offloaded SA(s).
Add a special flag that marks such SA so driver can handle it correctly.
Signed-off-by: Raed Salem <raeds@nvidia.com>
Link: https://lore.kernel.org/r/f5da0834d8c6b82ab9ba38bd4a0c55e71f0e3dab.1678714336.git.leon@kernel.org
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 2ab3e09e2227..7cca0a1fa5ff 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1272,6 +1272,7 @@ found: xso->dir = xdo->dir; xso->dev = xdo->dev; xso->real_dev = xdo->real_dev; + xso->flags = XFRM_DEV_OFFLOAD_FLAG_ACQ; netdev_tracker_alloc(xso->dev, &xso->dev_tracker, GFP_ATOMIC); error = xso->dev->xfrmdev_ops->xdo_dev_state_add(x, NULL); |