summaryrefslogtreecommitdiff
path: root/include/uapi/linux/xfrm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2022-12-02 21:41:27 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2022-12-05 12:30:47 +0300
commitd14f28b8c1de668bab863bf5892a49c824cb110d (patch)
tree625fe245a8118fde2fb7535984de4059f802115b /include/uapi/linux/xfrm.h
parent65e6af6cebefbf7d8d8ac52b71cd251c2071ad00 (diff)
downloadlinux-d14f28b8c1de668bab863bf5892a49c824cb110d.tar.xz
xfrm: add new packet offload flag
In the next patches, the xfrm core code will be extended to support new type of offload - packet offload. In that mode, both policy and state should be specially configured in order to perform whole offloaded data path. Full offload takes care of encryption, decryption, encapsulation and other operations with headers. As this mode is new for XFRM policy flow, we can "start fresh" with flag bits and release first and second bit for future use. Reviewed-by: Raed Salem <raeds@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/uapi/linux/xfrm.h')
-rw-r--r--include/uapi/linux/xfrm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 4f84ea7ee14c..23543c33fee8 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -519,6 +519,12 @@ struct xfrm_user_offload {
*/
#define XFRM_OFFLOAD_IPV6 1
#define XFRM_OFFLOAD_INBOUND 2
+/* Two bits above are relevant for state path only, while
+ * offload is used for both policy and state flows.
+ *
+ * In policy offload mode, they are free and can be safely reused.
+ */
+#define XFRM_OFFLOAD_PACKET 4
struct xfrm_userpolicy_default {
#define XFRM_USERPOLICY_UNSPEC 0