Skip to contentSkip to conversation

net/mlx5: fix gcc 10 enum-conversion warning

PATCH In review Kevin Traynor 3 participants 3 messages Mar 20, 2020 – May 4, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix gcc 10 enum-conversion warning

gcc 10.0.1 reports warnings when using mlx5_rte_flow enums with rte_flow type enums. For example:

../drivers/net/mlx5/mlx5_flow.c: In function ‘flow_hairpin_split’:
../drivers/net/mlx5/mlx5_flow.c:3406:19:
warning: implicit conversion from ‘enum mlx5_rte_flow_action_type’ to ‘enum rte_flow_action_type’ [-Wenum-conversion]
3406 | tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
| ^
../drivers/net/mlx5/mlx5_flow.c:3419:13:
warning: implicit conversion from ‘enum mlx5_rte_flow_item_type’ to ‘enum rte_flow_item_type’ [-Wenum-conversion]
3419 | item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
| ^

Fix by casting to the correct enum.

---
 drivers/net/mlx5/mlx5_flow.c | 46 ++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 15 deletions(-)
drivers/net/mlx5/mlx5_flow.c +31 -15
index 41072da6d..c1b87a3ed 100644
@@ -3002,5 +3002,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 	if (mark_id != MLX5_DEFAULT_COPY_ID) {
 		items[0] = (struct rte_flow_item){
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 			.spec = &tag_spec,
 		};
@@ -3009,9 +3010,11 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_MARK,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_MARK,
 			.conf = &ftag,
 		};
 		actions[1] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = &cp_mreg,
 		};
@@ -3030,5 +3033,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = &cp_mreg,
 		};
@@ -3404,5 +3408,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	/* Add set meta action and end action for the Rx flow. */
 	tag_action = actions_rx;
-	tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+	tag_action->type = (enum rte_flow_action_type)
+			   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 	actions_rx++;
 	rte_memcpy(actions_rx, actions, sizeof(struct rte_flow_action));
@@ -3417,5 +3422,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	addr = (void *)&pattern_tx[2];
 	item = pattern_tx;
-	item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	item->type = (enum rte_flow_item_type)
+		     MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item = (void *)addr;
 	tag_item->data = *flow_id;
@@ -3549,5 +3555,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 			/* Add the extra tag action first. */
 			tag_action = actions_pre;
-			tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+			tag_action->type = (enum rte_flow_action_type)
+					   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 			actions_pre++;
 			action_cur = &actions_pre;
@@ -3610,5 +3617,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 				 * for vlan push and set vid.
 				 */
-				sfx_items->type = MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+				sfx_items->type = (enum rte_flow_item_type)
+						  MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
 				sfx_items++;
 			}
@@ -3625,5 +3633,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	tag_mask = tag_spec + 1;
 	tag_mask->data = 0xffffff00;
-	tag_item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	tag_item->type = (enum rte_flow_item_type)
+			 MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item->spec = tag_spec;
 	tag_item->last = NULL;
@@ -3728,5 +3737,6 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
 		/* Replace QUEUE/RSS action. */
 		split_actions[qrss_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_TAG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_TAG,
 			.conf = set_tag,
 		};
@@ -3791,5 +3801,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
 	if (encap_idx == actions_n - 1) {
 		ext_actions[actions_n - 1] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = cp_mreg,
 		};
@@ -3799,5 +3810,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
 	} else {
 		ext_actions[encap_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = cp_mreg,
 		};
@@ -3913,4 +3925,5 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 		else
 			ext_actions[qrss - actions].type =
+						(enum rte_flow_action_type)
 						MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 		/*
@@ -3964,5 +3977,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 		struct rte_flow_item q_items[] = {
 			{
-				.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+				.type = (enum rte_flow_item_type)
+					MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 				.spec = &q_tag_spec,
 				.last = NULL,
@@ -4605,5 +4619,6 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev *dev,
 	struct rte_flow_item items[] = {
 		{
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
 			.spec = &queue_spec,
 			.last = NULL,
@@ -5722,5 +5737,6 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev *dev)
 		struct rte_flow_action actions[] = {
 			[0] = {
-				.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+				.type = (enum rte_flow_action_type)
+					MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 				.conf = &(struct mlx5_flow_action_copy_mreg){
 					.src = REG_C_1,
Signature · 1 line
2.21.1
Acked-by on v1 1/1
#1 lore raw
Quoted 22 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Kevin Traynor
Sent: Friday, March 20, 2020 18:48
To: [email protected]; Raslan Darawsheh <[email protected]>
Cc: Kevin Traynor <[email protected]>
Subject: [dpdk-dev] [PATCH] net/mlx5: fix gcc 10 enum-conversion warning

gcc 10.0.1 reports warnings when using mlx5_rte_flow enums with rte_flow type enums. For example:

../drivers/net/mlx5/mlx5_flow.c: In function ‘flow_hairpin_split’:
../drivers/net/mlx5/mlx5_flow.c:3406:19:
warning: implicit conversion from ‘enum mlx5_rte_flow_action_type’ to ‘enum rte_flow_action_type’ [-Wenum-conversion]
3406 | tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
| ^
../drivers/net/mlx5/mlx5_flow.c:3419:13:
warning: implicit conversion from ‘enum mlx5_rte_flow_item_type’ to ‘enum rte_flow_item_type’ [-Wenum-conversion]
3419 | item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
| ^

Quoted 3 lines

Fix by casting to the correct enum.

Quoted 161 lines
---
 drivers/net/mlx5/mlx5_flow.c | 46 ++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 15 deletions(-)
drivers/net/mlx5/mlx5_flow.c +2 -1
index 41072da6d..c1b87a3ed 100644
@@ -3002,5 +3002,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 	if (mark_id != MLX5_DEFAULT_COPY_ID) {
 		items[0] = (struct rte_flow_item){
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 			.spec = &tag_spec,
drivers/net/mlx5/mlx5_flow.c +4 -2
 		};
@@ -3009,9 +3010,11 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_MARK,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_MARK,
 			.conf = &ftag,
 		};
 		actions[1] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +2 -1
 			.conf = &cp_mreg,
 		};
@@ -3030,5 +3033,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +6 -3
 			.conf = &cp_mreg,
 		};
@@ -3404,5 +3408,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	/* Add set meta action and end action for the Rx flow. */
 	tag_action = actions_rx;
-	tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+	tag_action->type = (enum rte_flow_action_type)
+			   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 	actions_rx++;
 	rte_memcpy(actions_rx, actions, sizeof(struct rte_flow_action));
@@ -3417,5 +3422,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	addr = (void *)&pattern_tx[2];
 	item = pattern_tx;
-	item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	item->type = (enum rte_flow_item_type)
+		     MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item = (void *)addr;
 	tag_item->data = *flow_id;
@@ -3549,5 +3555,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 			/* Add the extra tag action first. */
 			tag_action = actions_pre;
-			tag_action->type =
 MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+			tag_action->type = (enum rte_flow_action_type)
+
 MLX5_RTE_FLOW_ACTION_TYPE_TAG;
drivers/net/mlx5/mlx5_flow.c +2 -1
 			actions_pre++;
 			action_cur = &actions_pre;
@@ -3610,5 +3617,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 				 * for vlan push and set vid.
 				 */
-				sfx_items->type =
 MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+				sfx_items->type = (enum
 rte_flow_item_type)
+

MLX5_RTE_FLOW_ITEM_TYPE_VLAN;

drivers/net/mlx5/mlx5_flow.c +4 -2
 				sfx_items++;
 			}
@@ -3625,5 +3633,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	tag_mask = tag_spec + 1;
 	tag_mask->data = 0xffffff00;
-	tag_item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	tag_item->type = (enum rte_flow_item_type)
+			 MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item->spec = tag_spec;
 	tag_item->last = NULL;
@@ -3728,5 +3737,6 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev
 *dev,
 		/* Replace QUEUE/RSS action. */
 		split_actions[qrss_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_TAG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_TAG,
 			.conf = set_tag,
drivers/net/mlx5/mlx5_flow.c +2 -1
 		};
@@ -3791,5 +3801,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev
 *dev,
 	if (encap_idx == actions_n - 1) {
 		ext_actions[actions_n - 1] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +2 -1
 			.conf = cp_mreg,
 		};
@@ -3799,5 +3810,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev
 *dev,
 	} else {
 		ext_actions[encap_idx] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +1 -0
 			.conf = cp_mreg,
 		};
@@ -3913,4 +3925,5 @@ flow_create_split_metadata(struct rte_eth_dev
 *dev,
 		else
 			ext_actions[qrss - actions].type =
+						(enum rte_flow_action_type)
 
	MLX5_RTE_FLOW_ACTION_TYPE_TAG;
drivers/net/mlx5/mlx5_flow.c +2 -1
 		/*
@@ -3964,5 +3977,6 @@ flow_create_split_metadata(struct rte_eth_dev
 *dev,
 		struct rte_flow_item q_items[] = {
 			{
-				.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+				.type = (enum rte_flow_item_type)
+					MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 				.spec = &q_tag_spec,
drivers/net/mlx5/mlx5_flow.c +2 -1
 				.last = NULL,
@@ -4605,5 +4619,6 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev
 *dev,
 	struct rte_flow_item items[] = {
 		{
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
 			.spec = &queue_spec,
drivers/net/mlx5/mlx5_flow.c +2 -1
 			.last = NULL,
@@ -5722,5 +5737,6 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev
 *dev)
 		struct rte_flow_action actions[] = {
 			[0] = {
-				.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+				.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
.conf = &(struct
mlx5_flow_action_copy_mreg){
.src = REG_C_1,
--
2.21.1

#2 lore raw
In reply to Kevin Traynor

Hi,

Quoted 181 lines

-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Friday, March 20, 2020 6:48 PM
To: [email protected]; Raslan Darawsheh <[email protected]>
Cc: Kevin Traynor <[email protected]>
Subject: [PATCH] net/mlx5: fix gcc 10 enum-conversion warning

gcc 10.0.1 reports warnings when using mlx5_rte_flow enums with rte_flow type enums. For example:

../drivers/net/mlx5/mlx5_flow.c: In function ‘flow_hairpin_split’:
../drivers/net/mlx5/mlx5_flow.c:3406:19:
warning: implicit conversion from ‘enum mlx5_rte_flow_action_type’ to ‘enum rte_flow_action_type’ [-Wenum-conversion]
3406 | tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
| ^
../drivers/net/mlx5/mlx5_flow.c:3419:13:
warning: implicit conversion from ‘enum mlx5_rte_flow_item_type’ to ‘enum rte_flow_item_type’ [-Wenum-conversion]
3419 | item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
| ^

Fix by casting to the correct enum.

---
 drivers/net/mlx5/mlx5_flow.c | 46 ++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 15 deletions(-)
drivers/net/mlx5/mlx5_flow.c +2 -1
index 41072da6d..c1b87a3ed 100644
@@ -3002,5 +3002,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 	if (mark_id != MLX5_DEFAULT_COPY_ID) {
 		items[0] = (struct rte_flow_item){
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 			.spec = &tag_spec,
drivers/net/mlx5/mlx5_flow.c +4 -2
 		};
@@ -3009,9 +3010,11 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_MARK,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_MARK,
 			.conf = &ftag,
 		};
 		actions[1] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +2 -1
 			.conf = &cp_mreg,
 		};
@@ -3030,5 +3033,6 @@ flow_mreg_add_copy_action(struct rte_eth_dev
 *dev, uint32_t mark_id,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +6 -3
 			.conf = &cp_mreg,
 		};
@@ -3404,5 +3408,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	/* Add set meta action and end action for the Rx flow. */
 	tag_action = actions_rx;
-	tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+	tag_action->type = (enum rte_flow_action_type)
+			   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 	actions_rx++;
 	rte_memcpy(actions_rx, actions, sizeof(struct rte_flow_action));
@@ -3417,5 +3422,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	addr = (void *)&pattern_tx[2];
 	item = pattern_tx;
-	item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	item->type = (enum rte_flow_item_type)
+		     MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item = (void *)addr;
 	tag_item->data = *flow_id;
@@ -3549,5 +3555,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 			/* Add the extra tag action first. */
 			tag_action = actions_pre;
-			tag_action->type =
 MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+			tag_action->type = (enum rte_flow_action_type)
+
 MLX5_RTE_FLOW_ACTION_TYPE_TAG;
drivers/net/mlx5/mlx5_flow.c +2 -1
 			actions_pre++;
 			action_cur = &actions_pre;
@@ -3610,5 +3617,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 				 * for vlan push and set vid.
 				 */
-				sfx_items->type =
 MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+				sfx_items->type = (enum
 rte_flow_item_type)
+

MLX5_RTE_FLOW_ITEM_TYPE_VLAN;

drivers/net/mlx5/mlx5_flow.c +4 -2
 				sfx_items++;
 			}
@@ -3625,5 +3633,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	tag_mask = tag_spec + 1;
 	tag_mask->data = 0xffffff00;
-	tag_item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	tag_item->type = (enum rte_flow_item_type)
+			 MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item->spec = tag_spec;
 	tag_item->last = NULL;
@@ -3728,5 +3737,6 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev
 *dev,
 		/* Replace QUEUE/RSS action. */
 		split_actions[qrss_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_TAG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_TAG,
 			.conf = set_tag,
drivers/net/mlx5/mlx5_flow.c +2 -1
 		};
@@ -3791,5 +3801,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev
 *dev,
 	if (encap_idx == actions_n - 1) {
 		ext_actions[actions_n - 1] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +2 -1
 			.conf = cp_mreg,
 		};
@@ -3799,5 +3810,6 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev
 *dev,
 	} else {
 		ext_actions[encap_idx] = (struct rte_flow_action){
-			.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,

drivers/net/mlx5/mlx5_flow.c +1 -0
 			.conf = cp_mreg,
 		};
@@ -3913,4 +3925,5 @@ flow_create_split_metadata(struct rte_eth_dev
 *dev,
 		else
 			ext_actions[qrss - actions].type =
+						(enum
 rte_flow_action_type)
	MLX5_RTE_FLOW_ACTION_TYPE_TAG;
drivers/net/mlx5/mlx5_flow.c +2 -1
 		/*
@@ -3964,5 +3977,6 @@ flow_create_split_metadata(struct rte_eth_dev
 *dev,
 		struct rte_flow_item q_items[] = {
 			{
-				.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+				.type = (enum rte_flow_item_type)
+					MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 				.spec = &q_tag_spec,
drivers/net/mlx5/mlx5_flow.c +2 -1
 				.last = NULL,
@@ -4605,5 +4619,6 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev
 *dev,
 	struct rte_flow_item items[] = {
 		{
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
 			.spec = &queue_spec,
drivers/net/mlx5/mlx5_flow.c +2 -1
 			.last = NULL,
@@ -5722,5 +5737,6 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev
 *dev)
 		struct rte_flow_action actions[] = {
 			[0] = {
-				.type =
 MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+				.type = (enum rte_flow_action_type)
+
Quoted 6 lines

MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
.conf = &(struct
mlx5_flow_action_copy_mreg){
.src = REG_C_1,
--
2.21.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh