From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT:
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.h

Change-Id: I3a04ae2dd1d9b94e4474874eae7d3fbdca1e5917
---
 .../ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.h   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.h
@@ -3,13 +3,13 @@
 
 #ifndef __MLX5_IPSEC_STEERING_H__
 #define __MLX5_IPSEC_STEERING_H__
-
 #include "en.h"
 #include "ipsec.h"
 #include "accel/ipsec_offload.h"
 #include "en/fs.h"
 
-#ifdef CONFIG_MLX5_EN_IPSEC
+
+#if defined(CONFIG_MLX5_EN_IPSEC) && defined(CONFIG_MLX5_ESWITCH)
 void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_priv *priv);
 int mlx5e_accel_ipsec_fs_init(struct mlx5e_priv *priv);
 int mlx5e_accel_ipsec_fs_add_rule(struct mlx5e_priv *priv,
@@ -22,5 +22,12 @@ void mlx5e_accel_ipsec_fs_del_rule(struc
 #else
 static inline void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_priv *priv) {}
 static inline int mlx5e_accel_ipsec_fs_init(struct mlx5e_priv *priv) { return 0; }
+static inline int mlx5e_accel_ipsec_fs_add_rule(struct mlx5e_priv *priv,
+		struct mlx5_accel_esp_xfrm_attrs *attrs,
+		u32 ipsec_obj_id,
+		struct mlx5e_ipsec_rule *ipsec_rule)	   { return 0; }
+static inline void mlx5e_accel_ipsec_fs_del_rule(struct mlx5e_priv *priv,
+				   struct mlx5_accel_esp_xfrm_attrs *attrs,
+				   struct mlx5e_ipsec_rule *ipsec_rule) {}
 #endif
 #endif /* __MLX5_IPSEC_STEERING_H__ */
