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/fs.h"
8 
9 #ifdef CONFIG_MLX5_EN_TLS
10 int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs);
11 void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs);
12 struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
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
mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering * fs)17 static inline int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs) { return 0; }
mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering * fs)18 static inline void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs) {}
mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering * fs,struct sock * sk,u32 tirn,uint32_t flow_tag)19 static inline struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
20 							     struct sock *sk, u32 tirn,
21 							     uint32_t flow_tag)
22 { return ERR_PTR(-EOPNOTSUPP); }
mlx5e_accel_fs_del_sk(struct mlx5_flow_handle * rule)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