summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorRaed Salem <raeds@nvidia.com>2023-03-14 10:58:39 +0200
committerLeon Romanovsky <leon@kernel.org>2023-03-20 11:29:33 +0200
commite0aeb9b90acf6ee7c2d11141522ffbb5481734d3 (patch)
treed4f08a4240018951f1ab15e6519e8af6e6ec8b97 /include/net/xfrm.h
parentfa5aa2f890733407e6df28b878926ae66a351b8a (diff)
downloadlinux-e0aeb9b90acf6ee7c2d11141522ffbb5481734d3.tar.gz
linux-e0aeb9b90acf6ee7c2d11141522ffbb5481734d3.tar.bz2
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 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 3e1f70e8e424..33ee3f5936e6 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -138,6 +138,10 @@ enum {
XFRM_DEV_OFFLOAD_PACKET,
};
+enum {
+ XFRM_DEV_OFFLOAD_FLAG_ACQ = 1,
+};
+
struct xfrm_dev_offload {
struct net_device *dev;
netdevice_tracker dev_tracker;
@@ -145,6 +149,7 @@ struct xfrm_dev_offload {
unsigned long offload_handle;
u8 dir : 2;
u8 type : 2;
+ u8 flags : 2;
};
struct xfrm_mode {