1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2020, Mellanox Technologies inc. All rights reserved. */ 3 4 #ifndef __MLX5E_ACCEL_FS_TCP_H__ 5 #define __MLX5E_ACCEL_FS_TCP_H__ 6 7 #include "en.h" 8 9 #ifdef CONFIG_MLX5_EN_TLS 10 int mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv); 11 void mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv); 12 struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_priv *priv, 13 struct sock *sk, u32 tirn, 14 uint32_t flow_tag); 15 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule); 16 #else 17 static inline int mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv) { return 0; } 18 static inline void mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv) {} 19 static inline struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_priv *priv, 20 struct sock *sk, u32 tirn, 21 uint32_t flow_tag) 22 { return ERR_PTR(-EOPNOTSUPP); } 23 static inline void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule) {} 24 #endif 25 26 #endif /* __MLX5E_ACCEL_FS_TCP_H__ */ 27 28