aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorLeon Romanovsky <[email protected]>2022-12-02 18:41:27 +0000
committerSteffen Klassert <[email protected]>2022-12-05 09:30:47 +0000
commitd14f28b8c1de668bab863bf5892a49c824cb110d (patch)
tree625fe245a8118fde2fb7535984de4059f802115b /net/xfrm/xfrm_user.c
parentnet: ethernet: mtk_wed: fix sleep while atomic in mtk_wed_wo_queue_refill (diff)
downloadkernel-d14f28b8c1de668bab863bf5892a49c824cb110d.tar.gz
kernel-d14f28b8c1de668bab863bf5892a49c824cb110d.zip
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 <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 0eb4696661c8..c3b8c1532718 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -956,6 +956,8 @@ static int copy_user_offload(struct xfrm_dev_offload *xso, struct sk_buff *skb)
xuo->ifindex = xso->dev->ifindex;
if (xso->dir == XFRM_DEV_OFFLOAD_IN)
xuo->flags = XFRM_OFFLOAD_INBOUND;
+ if (xso->type == XFRM_DEV_OFFLOAD_PACKET)
+ xuo->flags |= XFRM_OFFLOAD_PACKET;
return 0;
}