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

Change-Id: Ic810ed699ae906404a319e660205ce0937d08ccf
---
 drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred.c
@@ -121,10 +121,12 @@ tc_act_can_offload_mirred(struct mlx5e_t
 		return false;
 	}
 
+#ifdef HAVE_NETIF_IS_BAREDUDP
 	if (parse_state->mpls_push && !netif_is_bareudp(out_dev)) {
 		NL_SET_ERR_MSG_MOD(extack, "mpls is supported only through a bareudp device");
 		return false;
 	}
+#endif
 
 	if (parse_state->eth_pop && !parse_state->mpls_push) {
 		NL_SET_ERR_MSG_MOD(extack, "vlan pop eth is supported only with mpls push");
