Skip to contentSkip to conversation

net/mlx5: fix the size of tcp flags for modify actions

PATCH In review Wisam Jaddo 3 participants 3 messages Apr 28, 2021 – May 3, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix the size of tcp flags for modify actions

From RFC the size of the TCP flags is 9, while the defined current size is 6.

Fixes 641dbe4fb053 ("net/mlx5: support modify field flow action")
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/mlx5/mlx5_flow_dv.c +3 -3
index d810466242..43e929b892 100644
@@ -1366,7 +1366,7 @@ mlx5_flow_item_field_width(enum rte_flow_field_id field)
 	case RTE_FLOW_FIELD_TCP_ACK_NUM:
 		return 32;
 	case RTE_FLOW_FIELD_TCP_FLAGS:
-		return 6;
+		return 9;
 	case RTE_FLOW_FIELD_UDP_PORT_SRC:
 	case RTE_FLOW_FIELD_UDP_PORT_DST:
 		return 16;
@@ -1688,10 +1688,10 @@ mlx5_flow_field_id_to_modify_info
 						     (32 - width));
 		break;
 	case RTE_FLOW_FIELD_TCP_FLAGS:
-		info[idx] = (struct field_modify_info){1, 0,
+		info[idx] = (struct field_modify_info){2, 0,
 					MLX5_MODI_OUT_TCP_FLAGS};
 		if (mask)
-			mask[idx] = 0x3f >> (6 - width);
+			mask[idx] = rte_cpu_to_be_16(0x1ff >> (9 - width));
 		break;
 	case RTE_FLOW_FIELD_UDP_PORT_SRC:
 		info[idx] = (struct field_modify_info){2, 0,
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Wisam Monther <[email protected]>
Sent: Wednesday, April 28, 2021 13:29
To: Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Alexander Kozyrev <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix the size of tcp flags for modify actions

Quoted 8 lines

From RFC the size of the TCP flags is 9, while the defined current size is 6.

Fixes 641dbe4fb053 ("net/mlx5: support modify field flow action")
#2 lore raw
In reply to Wisam Jaddo

Hi,

Quoted 13 lines

-----Original Message-----
From: Wisam Monther <[email protected]>
Sent: Wednesday, April 28, 2021 1:29 PM
To: Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Alexander Kozyrev <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix the size of tcp flags for modify actions

From RFC the size of the TCP flags is 9, while the defined current size is 6.

Quoted 7 lines
Fixes 641dbe4fb053 ("net/mlx5: support modify field flow action")

---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh