Skip to contentSkip to conversation

net/mlx5: allow copy from one tag to another

PATCH In review Alexander Kozyrev 3 participants 3 messages May 25, 2021 – Jun 9, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: allow copy from one tag to another

The modify field implementation in mlx5 driver has a check to prevent a copy from a field to the same field. But the level is not taken into account which prevents a copy from different tags. Check the level and allow a copy from one tag to another.

Fixes 641dbe4fb05 ("net/mlx5: support modify field flow action")
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_dv.c +4 -2
index c50649a107..acb9af4e61 100644
@@ -4788,8 +4788,10 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev,
 					"inner header fields modification"
 					" is not supported");
 	}
-	if (action_modify_field->dst.field ==
-	    action_modify_field->src.field)
+	if ((action_modify_field->dst.field ==
+	     action_modify_field->src.field) &&
+	    (action_modify_field->dst.level ==
+	     action_modify_field->src.level))
 		return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION, action,
 				"source and destination fields"
Signature · 1 line
2.18.2
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Tuesday, May 25, 2021 20:14
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>
Subject: [PATCH] net/mlx5: allow copy from one tag to another

The modify field implementation in mlx5 driver has a check to prevent a copy from a field to the same field. But the level is not taken into account which prevents a copy from different tags. Check the level and allow a copy from one tag to another.

Quoted 4 lines
Fixes 641dbe4fb05 ("net/mlx5: support modify field flow action")
#2 lore raw
In reply to Alexander Kozyrev

Hi,

Quoted 9 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Tuesday, May 25, 2021 8:14 PM
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>
Subject: [PATCH] net/mlx5: allow copy from one tag to another

Quoted 7 lines

The modify field implementation in mlx5 driver has a check to prevent a copy from a field to the same field. But the level is not taken into account which prevents a copy from different tags. Check the level and allow a copy from one tag to another.

Fixes 641dbe4fb05 ("net/mlx5: support modify field flow action")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh