diff options
author | Boris Pismenny <borisp@mellanox.com> | 2018-07-13 14:33:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-16 00:13:11 -0700 |
commit | ca942c78f3237e09567d80ac19dffe9690c74d79 (patch) | |
tree | bc652d1687e5b56c016056b0fdbc41ca9e0b6c09 /drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h | |
parent | ab412e1dd7db132c2abeb9385b4bf0dc8e6c5a65 (diff) |
net/mlx5e: TLS, add innova rx support
Add the mlx5 implementation of the TLS Rx routines to add/del TLS
contexts, also add the tls_dev_resync_rx routine
to work with the TLS inline Rx crypto offload infrastructure.
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h index e26222ab26a6..2d40eded2bbb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h @@ -65,6 +65,21 @@ mlx5e_get_tls_tx_context(struct tls_context *tls_ctx) base); } +struct mlx5e_tls_offload_context_rx { + struct tls_offload_context_rx base; + __be32 handle; +}; + +static inline struct mlx5e_tls_offload_context_rx * +mlx5e_get_tls_rx_context(struct tls_context *tls_ctx) +{ + BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context_rx) > + TLS_OFFLOAD_CONTEXT_SIZE_RX); + return container_of(tls_offload_ctx_rx(tls_ctx), + struct mlx5e_tls_offload_context_rx, + base); +} + void mlx5e_tls_build_netdev(struct mlx5e_priv *priv); int mlx5e_tls_init(struct mlx5e_priv *priv); void mlx5e_tls_cleanup(struct mlx5e_priv *priv); |