summaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
authorVakul Garg <vakul.garg@nxp.com>2018-01-31 21:34:37 +0530
committerDavid S. Miller <davem@davemloft.net>2018-01-31 10:26:30 -0500
commita54667f6728c2714a400f3c884727da74b6d1717 (patch)
tree5c722a9de6ef67c3ba7304516838b7e5ae1631d7 /include/net/tls.h
parent4adfa79fc254efb7b0eb3cd58f62c2c3f805f1ba (diff)
downloadop-kernel-dev-a54667f6728c2714a400f3c884727da74b6d1717.zip
op-kernel-dev-a54667f6728c2714a400f3c884727da74b6d1717.tar.gz
tls: Add support for encryption using async offload accelerator
Async crypto accelerators (e.g. drivers/crypto/caam) support offloading GCM operation. If they are enabled, crypto_aead_encrypt() return error code -EINPROGRESS. In this case tls_do_encryption() needs to wait on a completion till the time the response for crypto offload request is received. Signed-off-by: Vakul Garg <vakul.garg@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tls.h')
-rw-r--r--include/net/tls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 9185e53..4913430 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -36,6 +36,7 @@
#include <linux/types.h>
#include <asm/byteorder.h>
+#include <linux/crypto.h>
#include <linux/socket.h>
#include <linux/tcp.h>
#include <net/tcp.h>
@@ -57,6 +58,7 @@
struct tls_sw_context {
struct crypto_aead *aead_send;
+ struct crypto_wait async_wait;
/* Sending context */
char aad_space[TLS_AAD_SPACE_SIZE];
OpenPOWER on IntegriCloud