• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2020, Mellanox Technologies inc. All rights reserved. */
3 
4 #ifndef __MLX5_IPSEC_STEERING_H__
5 #define __MLX5_IPSEC_STEERING_H__
6 
7 #include "en.h"
8 #include "ipsec.h"
9 #include "accel/ipsec_offload.h"
10 #include "en/fs.h"
11 
12 #ifdef CONFIG_MLX5_EN_IPSEC
13 void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_priv *priv);
14 int mlx5e_accel_ipsec_fs_init(struct mlx5e_priv *priv);
15 int mlx5e_accel_ipsec_fs_add_rule(struct mlx5e_priv *priv,
16 				  struct mlx5_accel_esp_xfrm_attrs *attrs,
17 				  u32 ipsec_obj_id,
18 				  struct mlx5e_ipsec_rule *ipsec_rule);
19 void mlx5e_accel_ipsec_fs_del_rule(struct mlx5e_priv *priv,
20 				   struct mlx5_accel_esp_xfrm_attrs *attrs,
21 				   struct mlx5e_ipsec_rule *ipsec_rule);
22 #else
mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_priv * priv)23 static inline void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_priv *priv) {}
mlx5e_accel_ipsec_fs_init(struct mlx5e_priv * priv)24 static inline int mlx5e_accel_ipsec_fs_init(struct mlx5e_priv *priv) { return 0; }
25 #endif
26 #endif /* __MLX5_IPSEC_STEERING_H__ */
27