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

Change-Id: I83f767cb28e10ecd80f5d90506dced476ac0c5bd
---
 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
@@ -8,10 +8,12 @@
 #include <linux/mlx5/fs.h>
 #include <net/pkt_cls.h>
 #include <linux/netlink.h>
-#include "en.h"
-#include "en_rep.h"
+#include "../en.h"
+#include "../en_rep.h"
+#include "../eswitch.h"
 
 #ifdef CONFIG_MLX5_ESWITCH
+#ifdef HAVE_TCF_TUNNEL_INFO
 
 enum {
 	MLX5E_TC_TUNNEL_TYPE_UNKNOWN,
@@ -36,6 +38,7 @@ struct mlx5e_tc_tunnel {
 			       struct mlx5e_priv *priv,
 			       struct mlx5e_encap_entry *e,
 			       struct netlink_ext_ack *extack);
+
 	int (*generate_ip_tun_hdr)(char buf[],
 				   __u8 *ip_proto,
 				   struct mlx5e_encap_entry *e);
@@ -44,6 +47,7 @@ struct mlx5e_tc_tunnel {
 			       struct flow_cls_offload *f,
 			       void *headers_c,
 			       void *headers_v);
+
 	int (*parse_tunnel)(struct mlx5e_priv *priv,
 			    struct mlx5_flow_spec *spec,
 			    struct flow_cls_offload *f,
@@ -115,6 +119,7 @@ int mlx5e_tc_tun_parse_udp_ports(struct
 bool mlx5e_tc_tun_encap_info_equal_generic(struct mlx5e_encap_key *a,
 					   struct mlx5e_encap_key *b);
 
+#endif /* HAVE_TCF_TUNNEL_INFO */
 #endif /* CONFIG_MLX5_ESWITCH */
 
 #endif //__MLX5_EN_TC_TUNNEL_H__
