Commit a5c37c63 authored by Ilya Lesokhin's avatar Ilya Lesokhin Committed by David S. Miller

net: Add TLS offload netdev ops

Add new netdev ops to add and delete tls context
Signed-off-by: default avatarIlya Lesokhin <ilyal@mellanox.com>
Signed-off-by: default avatarBoris Pismenny <borisp@mellanox.com>
Signed-off-by: default avatarAviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ebf4e808
...@@ -865,6 +865,26 @@ struct xfrmdev_ops { ...@@ -865,6 +865,26 @@ struct xfrmdev_ops {
}; };
#endif #endif
#if IS_ENABLED(CONFIG_TLS_DEVICE)
enum tls_offload_ctx_dir {
TLS_OFFLOAD_CTX_DIR_RX,
TLS_OFFLOAD_CTX_DIR_TX,
};
struct tls_crypto_info;
struct tls_context;
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);
};
#endif
struct dev_ifalias { struct dev_ifalias {
struct rcu_head rcuhead; struct rcu_head rcuhead;
char ifalias[]; char ifalias[];
...@@ -1750,6 +1770,10 @@ struct net_device { ...@@ -1750,6 +1770,10 @@ struct net_device {
const struct xfrmdev_ops *xfrmdev_ops; const struct xfrmdev_ops *xfrmdev_ops;
#endif #endif
#if IS_ENABLED(CONFIG_TLS_DEVICE)
const struct tlsdev_ops *tlsdev_ops;
#endif
const struct header_ops *header_ops; const struct header_ops *header_ops;
unsigned int flags; unsigned int flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment