hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h
....@@ -33,8 +33,10 @@
3333 #ifndef __MLX5E_TLS_H__
3434 #define __MLX5E_TLS_H__
3535
36
-#ifdef CONFIG_MLX5_EN_TLS
36
+#include "accel/tls.h"
37
+#include "en_accel/ktls.h"
3738
39
+#ifdef CONFIG_MLX5_EN_TLS
3840 #include <net/tls.h>
3941 #include "en.h"
4042
....@@ -51,6 +53,7 @@
5153
5254 struct mlx5e_tls {
5355 struct mlx5e_tls_sw_stats sw_stats;
56
+ struct workqueue_struct *rx_wq;
5457 };
5558
5659 struct mlx5e_tls_offload_context_tx {
....@@ -84,6 +87,11 @@
8487 base);
8588 }
8689
90
+static inline bool mlx5e_is_tls_on(struct mlx5e_priv *priv)
91
+{
92
+ return priv->tls;
93
+}
94
+
8795 void mlx5e_tls_build_netdev(struct mlx5e_priv *priv);
8896 int mlx5e_tls_init(struct mlx5e_priv *priv);
8997 void mlx5e_tls_cleanup(struct mlx5e_priv *priv);
....@@ -94,7 +102,13 @@
94102
95103 #else
96104
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; }
98112 static inline int mlx5e_tls_init(struct mlx5e_priv *priv) { return 0; }
99113 static inline void mlx5e_tls_cleanup(struct mlx5e_priv *priv) { }
100114 static inline int mlx5e_tls_get_count(struct mlx5e_priv *priv) { return 0; }