diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-04-25 12:32:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-27 16:52:21 -0400 |
commit | da68b4ad02343862fee1e3e8c6315984f16a4778 (patch) | |
tree | 777e9209b580624e9b3fcf0bf9c7c634a0d3cb3d /include/net/tls.h | |
parent | 9e9957973c7785b1f8fa77f099cac661cc5e7e5b (diff) | |
download | linux-da68b4ad02343862fee1e3e8c6315984f16a4778.tar.bz2 |
net/tls: move definition of tls ops into net/tls.h
There seems to be no reason for tls_ops to be defined in netdevice.h
which is included in a lot of places. Don't wrap the struct/enum
declaration in ifdefs, it trickles down unnecessary ifdefs into
driver code.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tls.h')
-rw-r--r-- | include/net/tls.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/tls.h b/include/net/tls.h index 20196cb31ecc..41a2ee643fc5 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -277,6 +277,23 @@ struct tls_context { void (*unhash)(struct sock *sk); }; +enum tls_offload_ctx_dir { + TLS_OFFLOAD_CTX_DIR_RX, + TLS_OFFLOAD_CTX_DIR_TX, +}; + +struct tlsdev_ops { + int (*tls_dev_add)(struct net_device *netdev, struct sock *sk, + enum tls_offload_ctx_dir direction, + struct tls_crypto_info *crypto_info, + u32 start_offload_tcp_sn); + void (*tls_dev_del)(struct net_device *netdev, + struct tls_context *ctx, + enum tls_offload_ctx_dir direction); + void (*tls_dev_resync_rx)(struct net_device *netdev, + struct sock *sk, u32 seq, u64 rcd_sn); +}; + struct tls_offload_context_rx { /* sw must be the first member of tls_offload_context_rx */ struct tls_sw_context_rx sw; |