aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Buslov <[email protected]>2021-02-09 10:11:45 +0200
committerSaeed Mahameed <[email protected]>2021-02-10 20:47:13 -0800
commit36280f0797dfca856cda25feec085b03bc4f5609 (patch)
treeed02247bb5dc120244a21295cab754c2459a05c9
parent793985432daadaf443b213fdd30123778a7e40cf (diff)
net/mlx5e: Fix tc_tun.h to verify MLX5_ESWITCH config
Exclude contents of tc_tun.h header when CONFIG_MLX5_ESWITCH is disabled to prevent compile-time errors when compiling with such config. Fixes: 0d9f96471493 ("net/mlx5e: Extract tc tunnel encap/decap code to dedicated file") Signed-off-by: Vlad Buslov <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
index fa992e869044..67de2bf36861 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
@@ -11,6 +11,8 @@
#include "en.h"
#include "en_rep.h"
+#ifdef CONFIG_MLX5_ESWITCH
+
enum {
MLX5E_TC_TUNNEL_TYPE_UNKNOWN,
MLX5E_TC_TUNNEL_TYPE_VXLAN,
@@ -99,4 +101,6 @@ int mlx5e_tc_tun_parse_udp_ports(struct mlx5e_priv *priv,
void *headers_c,
void *headers_v);
+#endif /* CONFIG_MLX5_ESWITCH */
+
#endif //__MLX5_EN_TC_TUNNEL_H__