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

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

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/prio.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/prio.c
@@ -12,10 +12,12 @@ tc_act_can_offload_prio(struct mlx5e_tc_
 			int act_index,
 			struct mlx5_flow_attr *attr)
 {
+#ifdef HAVE_FLOW_ACTION_PRIORITY
 	if (act->priority > mlx5e_fs_get_tc(parse_state->flow->priv->fs)->num_prio_hp) {
 		NL_SET_ERR_MSG_MOD(parse_state->extack, "Skb priority value is out of range");
 		return false;
 	}
+#endif
 
 	return true;
 }
@@ -27,6 +29,7 @@ tc_act_parse_prio(struct mlx5e_tc_act_pa
 			 struct mlx5e_priv *priv,
 			 struct mlx5_flow_attr *attr)
 {
+#ifdef HAVE_FLOW_ACTION_PRIORITY
 	int err;
 
 	attr->nic_attr->user_prio = act->priority;
@@ -37,6 +40,7 @@ tc_act_parse_prio(struct mlx5e_tc_act_pa
 		return err;
 
 	attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
+#endif
 
 	return 0;
 }
