| .. | .. |
|---|
| 33 | 33 | #ifndef __MLX5E_TLS_H__ |
|---|
| 34 | 34 | #define __MLX5E_TLS_H__ |
|---|
| 35 | 35 | |
|---|
| 36 | | -#ifdef CONFIG_MLX5_EN_TLS |
|---|
| 36 | +#include "accel/tls.h" |
|---|
| 37 | +#include "en_accel/ktls.h" |
|---|
| 37 | 38 | |
|---|
| 39 | +#ifdef CONFIG_MLX5_EN_TLS |
|---|
| 38 | 40 | #include <net/tls.h> |
|---|
| 39 | 41 | #include "en.h" |
|---|
| 40 | 42 | |
|---|
| .. | .. |
|---|
| 51 | 53 | |
|---|
| 52 | 54 | struct mlx5e_tls { |
|---|
| 53 | 55 | struct mlx5e_tls_sw_stats sw_stats; |
|---|
| 56 | + struct workqueue_struct *rx_wq; |
|---|
| 54 | 57 | }; |
|---|
| 55 | 58 | |
|---|
| 56 | 59 | struct mlx5e_tls_offload_context_tx { |
|---|
| .. | .. |
|---|
| 84 | 87 | base); |
|---|
| 85 | 88 | } |
|---|
| 86 | 89 | |
|---|
| 90 | +static inline bool mlx5e_is_tls_on(struct mlx5e_priv *priv) |
|---|
| 91 | +{ |
|---|
| 92 | + return priv->tls; |
|---|
| 93 | +} |
|---|
| 94 | + |
|---|
| 87 | 95 | void mlx5e_tls_build_netdev(struct mlx5e_priv *priv); |
|---|
| 88 | 96 | int mlx5e_tls_init(struct mlx5e_priv *priv); |
|---|
| 89 | 97 | void mlx5e_tls_cleanup(struct mlx5e_priv *priv); |
|---|
| .. | .. |
|---|
| 94 | 102 | |
|---|
| 95 | 103 | #else |
|---|
| 96 | 104 | |
|---|
| 97 | | -static inline void mlx5e_tls_build_netdev(struct mlx5e_priv *priv) { } |
|---|
| 105 | +static inline void mlx5e_tls_build_netdev(struct mlx5e_priv *priv) |
|---|
| 106 | +{ |
|---|
| 107 | + if (mlx5_accel_is_ktls_device(priv->mdev)) |
|---|
| 108 | + mlx5e_ktls_build_netdev(priv); |
|---|
| 109 | +} |
|---|
| 110 | + |
|---|
| 111 | +static inline bool mlx5e_is_tls_on(struct mlx5e_priv *priv) { return false; } |
|---|
| 98 | 112 | static inline int mlx5e_tls_init(struct mlx5e_priv *priv) { return 0; } |
|---|
| 99 | 113 | static inline void mlx5e_tls_cleanup(struct mlx5e_priv *priv) { } |
|---|
| 100 | 114 | static inline int mlx5e_tls_get_count(struct mlx5e_priv *priv) { return 0; } |
|---|