Files
linux_media/net/tls/tls_strp.c
Jakub Kicinski c618db2afe tls: rx: async: hold onto the input skb
Async crypto currently benefits from the fact that we decrypt
in place. When we allow input and output to be different skbs
we will have to hang onto the input while we move to the next
record. Clone the inputs and keep them on a list.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-18 11:24:11 +01:00

18 lines
327 B
C

// SPDX-License-Identifier: GPL-2.0-only
#include <linux/skbuff.h>
#include "tls.h"
int tls_strp_msg_hold(struct sock *sk, struct sk_buff *skb,
struct sk_buff_head *dst)
{
struct sk_buff *clone;
clone = skb_clone(skb, sk->sk_allocation);
if (!clone)
return -ENOMEM;
__skb_queue_tail(dst, clone);
return 0;
}