diff options
| author | Ilya Lesokhin <ilyal@mellanox.com> | 2018-04-30 03:16:13 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-05-01 09:42:47 -0400 |
| commit | a5c37c63f71b044fbe1a3f893d6f6daa36fee5f5 (patch) | |
| tree | 726ad7fdada962c63fedd7198f2c6f168dd265b7 /include/linux | |
| parent | ebf4e808fa0b22e551baf862e17c26c325c068f4 (diff) | |
net: Add TLS offload netdev ops
Add new netdev ops to add and delete tls context
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9e09dd897b74..a569bf5524fa 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -865,6 +865,26 @@ struct xfrmdev_ops { | |||
| 865 | }; | 865 | }; |
| 866 | #endif | 866 | #endif |
| 867 | 867 | ||
| 868 | #if IS_ENABLED(CONFIG_TLS_DEVICE) | ||
| 869 | enum tls_offload_ctx_dir { | ||
| 870 | TLS_OFFLOAD_CTX_DIR_RX, | ||
| 871 | TLS_OFFLOAD_CTX_DIR_TX, | ||
| 872 | }; | ||
| 873 | |||
| 874 | struct tls_crypto_info; | ||
| 875 | struct tls_context; | ||
| 876 | |||
| 877 | struct tlsdev_ops { | ||
| 878 | int (*tls_dev_add)(struct net_device *netdev, struct sock *sk, | ||
| 879 | enum tls_offload_ctx_dir direction, | ||
| 880 | struct tls_crypto_info *crypto_info, | ||
| 881 | u32 start_offload_tcp_sn); | ||
| 882 | void (*tls_dev_del)(struct net_device *netdev, | ||
| 883 | struct tls_context *ctx, | ||
| 884 | enum tls_offload_ctx_dir direction); | ||
| 885 | }; | ||
| 886 | #endif | ||
| 887 | |||
| 868 | struct dev_ifalias { | 888 | struct dev_ifalias { |
| 869 | struct rcu_head rcuhead; | 889 | struct rcu_head rcuhead; |
| 870 | char ifalias[]; | 890 | char ifalias[]; |
| @@ -1750,6 +1770,10 @@ struct net_device { | |||
| 1750 | const struct xfrmdev_ops *xfrmdev_ops; | 1770 | const struct xfrmdev_ops *xfrmdev_ops; |
| 1751 | #endif | 1771 | #endif |
| 1752 | 1772 | ||
| 1773 | #if IS_ENABLED(CONFIG_TLS_DEVICE) | ||
| 1774 | const struct tlsdev_ops *tlsdev_ops; | ||
| 1775 | #endif | ||
| 1776 | |||
| 1753 | const struct header_ops *header_ops; | 1777 | const struct header_ops *header_ops; |
| 1754 | 1778 | ||
| 1755 | unsigned int flags; | 1779 | unsigned int flags; |
