summaryrefslogtreecommitdiff
path: root/net/tls/tls_strp.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-22 16:50:30 -0700
committerJakub Kicinski <kuba@kernel.org>2022-07-26 14:38:51 -0700
commitd4e5db6452211467f668521f5a3bd3c3928918e1 (patch)
treedf5863e1025a26d4ed2842d7c2e38761ec306b50 /net/tls/tls_strp.c
parentb93f5700164dabc59f5c82857dbe571e0ccb2d35 (diff)
tls: rx: device: keep the zero copy status with offload
The non-zero-copy path assumes a full skb with decrypted contents. This means the device offload would have to CoW the data. Try to keep the zero-copy status instead, copy the data to user space. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls_strp.c')
-rw-r--r--net/tls/tls_strp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/tls/tls_strp.c b/net/tls/tls_strp.c
index 9ccab79a6e1e..40b177366121 100644
--- a/net/tls/tls_strp.c
+++ b/net/tls/tls_strp.c
@@ -4,6 +4,15 @@
#include "tls.h"
+struct sk_buff *tls_strp_msg_detach(struct tls_sw_context_rx *ctx)
+{
+ struct sk_buff *skb;
+
+ skb = ctx->recv_pkt;
+ ctx->recv_pkt = NULL;
+ return skb;
+}
+
int tls_strp_msg_hold(struct sock *sk, struct sk_buff *skb,
struct sk_buff_head *dst)
{