1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2019 Mellanox Technologies. */ 3 4 #ifndef __MLX5E_KTLS_H__ 5 #define __MLX5E_KTLS_H__ 6 7 #include "en.h" 8 9 #ifdef CONFIG_MLX5_EN_TLS 10 11 void mlx5e_ktls_build_netdev(struct mlx5e_priv *priv); 12 int mlx5e_ktls_init_rx(struct mlx5e_priv *priv); 13 void mlx5e_ktls_cleanup_rx(struct mlx5e_priv *priv); 14 int mlx5e_ktls_set_feature_rx(struct net_device *netdev, bool enable); 15 #else 16 mlx5e_ktls_build_netdev(struct mlx5e_priv * priv)17static inline void mlx5e_ktls_build_netdev(struct mlx5e_priv *priv) 18 { 19 } 20 mlx5e_ktls_init_rx(struct mlx5e_priv * priv)21static inline int mlx5e_ktls_init_rx(struct mlx5e_priv *priv) 22 { 23 return 0; 24 } 25 mlx5e_ktls_cleanup_rx(struct mlx5e_priv * priv)26static inline void mlx5e_ktls_cleanup_rx(struct mlx5e_priv *priv) 27 { 28 } 29 mlx5e_ktls_set_feature_rx(struct net_device * netdev,bool enable)30static inline int mlx5e_ktls_set_feature_rx(struct net_device *netdev, bool enable) 31 { 32 netdev_warn(netdev, "kTLS is not supported\n"); 33 return -EOPNOTSUPP; 34 } 35 36 #endif 37 38 #endif /* __MLX5E_TLS_H__ */ 39