aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-07-19 10:29:14 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-07-22 16:04:16 +0200
commit318892ac068397f40ff81d9155898da01493b1d2 (patch)
treea16b6ee38d52cdfd8fff38bc9f703290b96c2f59 /include/net/tls.h
parentlibbpf: sanitize VAR to conservative 1-byte INT (diff)
downloadlinux-dev-318892ac068397f40ff81d9155898da01493b1d2.tar.xz
linux-dev-318892ac068397f40ff81d9155898da01493b1d2.zip
net/tls: don't arm strparser immediately in tls_set_sw_offload()
In tls_set_device_offload_rx() we prepare the software context for RX fallback and proceed to add the connection to the device. Unfortunately, software context prep includes arming strparser so in case of a later error we have to release the socket lock to call strp_done(). In preparation for not releasing the socket lock half way through callbacks move arming strparser into a separate function. Following patches will make use of that. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/net/tls.h')
-rw-r--r--include/net/tls.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 584609174fe0..43f551cd508b 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -355,6 +355,7 @@ int tls_sk_attach(struct sock *sk, int optname, char __user *optval,
unsigned int optlen);
int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx);
+void tls_sw_strparser_arm(struct sock *sk, struct tls_context *ctx);
int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
int tls_sw_sendpage(struct sock *sk, struct page *page,
int offset, size_t size, int flags);