diff options
author | Dirk van der Merwe <dirk.vandermerwe@netronome.com> | 2019-06-05 23:11:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-06 23:13:40 +0200 |
commit | b9727d7f957d68febb3b5f68d4be270ee6fb57e7 (patch) | |
tree | 640ce3d4b2c51f8af8e4047d32caf532da86d423 /net/tls | |
parent | net/tls: simplify driver context retrieval (diff) | |
download | linux-b9727d7f957d68febb3b5f68d4be270ee6fb57e7.tar.xz linux-b9727d7f957d68febb3b5f68d4be270ee6fb57e7.zip |
net/tls: export TLS per skb encryption
While offloading TLS connections, drivers need to handle the case where
out of order packets need to be transmitted.
Other drivers obtain the entire TLS record for the specific skb to
provide as context to hardware for encryption. However, other designs
may also want to keep the hardware state intact and perform the
out of order encryption entirely on the host.
To achieve this, export the already existing software encryption
fallback path so drivers could access this.
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device_fallback.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/tls/tls_device_fallback.c b/net/tls/tls_device_fallback.c index 5a087e1981c3..1d2d804ac633 100644 --- a/net/tls/tls_device_fallback.c +++ b/net/tls/tls_device_fallback.c @@ -426,6 +426,12 @@ struct sk_buff *tls_validate_xmit_skb(struct sock *sk, } EXPORT_SYMBOL_GPL(tls_validate_xmit_skb); +struct sk_buff *tls_encrypt_skb(struct sk_buff *skb) +{ + return tls_sw_fallback(skb->sk, skb); +} +EXPORT_SYMBOL_GPL(tls_encrypt_skb); + int tls_sw_fallback_init(struct sock *sk, struct tls_offload_context_tx *offload_ctx, struct tls_crypto_info *crypto_info) |