Skip to contentSkip to conversation

fix RSS expansion missing items

PATCH In review Xiaoyu Min 3 participants 8 messages Jul 7, 2021 – Jul 14, 2021 Network drivers

lore
Share & tools
lore

Xiaoyu Min

author
#0 lore raw

cover fix RSS expansion missing items

This patch set fixs the missing items in RSS expansion.

Xiaoyu Min (2):
net/mlx5: fix missing RSS expandable items net/mlx5: fix missing RSS expansion of IPv6 frag

 drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.32.0
author
#1 lore raw

PATCH 1/2 net/mlx5: fix missing RSS expandable items

Some RSS expandable items are missing which leads to the expanded rte flow rules with wrong patterns.

Fix by adding missed items.

Fixes d91093b9a2af ("net/mlx5: fix RSS pattern expansion")
---
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow.c +2 -0
index 987fc66205..1b682ac8ed 100644
@@ -132,6 +132,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_GRE:
 	case RTE_FLOW_ITEM_TYPE_GENEVE:
 	case RTE_FLOW_ITEM_TYPE_MPLS:
+	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+	case RTE_FLOW_ITEM_TYPE_GRE_KEY:
 		return true;
 	default:
 		break;
Signature · 1 line
2.32.0
author
#2 lore raw

PATCH 2/2 net/mlx5: fix missing RSS expansion of IPv6 frag

In reply to Xiaoyu Min

IPV6_FRAG_EXT item is missed for RSS expansion which causes flows like
[1] are wrongly expanded.

Different from other items, IPV6_FRAG_EXT hasn't next field because HW only support to do hash of UDP/TCP for non-fragment.

This MLX5_EXPANSION_IPV6_FRAG_EXT node in RSS expansion graph only helps RSS expansion function to locate right node in graph from which start to expand.

Fixes 0e5a0d8f7556 ("net/mlx5: support match on IPv6 fragment extension")

[1]:
flow create 0 ingress pattern eth / ipv6 / udp dst is 250 / vxlan-gpe / ipv6 / ipv6_frag_ext / end actions rss level 2 types ip end / end

---
 drivers/net/mlx5/mlx5_flow.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow.c +7 -1
index 1b682ac8ed..90b8cf6692 100644
@@ -134,6 +134,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_MPLS:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 	case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
 		return true;
 	default:
 		break;
@@ -453,6 +454,7 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_IPV6,
 	MLX5_EXPANSION_IPV6_UDP,
 	MLX5_EXPANSION_IPV6_TCP,
+	MLX5_EXPANSION_IPV6_FRAG_EXT,
 };
 
 /** Supported expansion of items. */
@@ -607,7 +609,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 	},
 	[MLX5_EXPANSION_IPV6] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV6_UDP,
-						  MLX5_EXPANSION_IPV6_TCP),
+						  MLX5_EXPANSION_IPV6_TCP,
+						  MLX5_EXPANSION_IPV6_FRAG_EXT),
 		.type = RTE_FLOW_ITEM_TYPE_IPV6,
 		.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
 			ETH_RSS_NONFRAG_IPV6_OTHER,
@@ -620,6 +623,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_TCP,
 		.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
 	},
+	[MLX5_EXPANSION_IPV6_FRAG_EXT] = {
+		.type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
+	},
 };
 
 static struct rte_flow_action_handle *
Signature · 1 line
2.32.0
#6 lore raw
In reply to Xiaoyu Min

From: Xiaoyu Min

Quoted 6 lines

This patch set fixs the missing items in RSS expansion.

Xiaoyu Min (2):
net/mlx5: fix missing RSS expandable items net/mlx5: fix missing RSS expansion of IPv6 frag

Series-acked -by: Matan Azrad <[email protected]>

Quoted 5 lines
 drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--
2.32.0

#3 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

In reply to Xiaoyu Min

Hi,

Quoted 39 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaoyu Min
Sent: Wednesday, July 7, 2021 5:33 AM
To: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>; Ori Kam <[email protected]>
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

IPV6_FRAG_EXT item is missed for RSS expansion which causes flows like
[1] are wrongly expanded.

Different from other items, IPV6_FRAG_EXT hasn't next field because HW only support to do hash of UDP/TCP for non-fragment.

This MLX5_EXPANSION_IPV6_FRAG_EXT node in RSS expansion graph only helps
RSS expansion function to locate right node in graph from which start to expand.

Fixes 0e5a0d8f7556 ("net/mlx5: support match on IPv6 fragment

extension")
Cc: [email protected]

[1]:
flow create 0 ingress pattern eth / ipv6 / udp dst is 250 / vxlan-gpe / ipv6 / ipv6_frag_ext / end actions rss level 2 types ip end / end

---
 drivers/net/mlx5/mlx5_flow.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow.c +0 -0
index 1b682ac8ed..90b8cf6692 100644

drivers/net/mlx5/mlx5_flow.c mlx5_flow_is_rss_expandable_item(const struct · line 138

Quoted 5 lines
drivers/net/mlx5/mlx5_flow.c +1 -0
@@ -134,6 +134,7 @@ mlx5_flow_is_rss_expandable_item(const struct
 rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_MPLS:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 	case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:

Adding IPV6_FRAG_EXT to the list of expandable is not accurate,
Assuming HW support matching on L4 info after frag - which I think it doesn't.
It will lead that the first frag will get different hash than other frags since it the only one which contain info of L4 header This will lead to different RSS spreading and that's not correct.

Kindest regards,
Raslan Darawsheh

author
#4 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

On Mon, 21-07-12, 08:05, Raslan Darawsheh wrote:

Hey,

Quoted 36 lines

Hi,

Quoted 34 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaoyu Min
Sent: Wednesday, July 7, 2021 5:33 AM
To: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>; Ori Kam <[email protected]>
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

IPV6_FRAG_EXT item is missed for RSS expansion which causes flows like
[1] are wrongly expanded.

Different from other items, IPV6_FRAG_EXT hasn't next field because HW only support to do hash of UDP/TCP for non-fragment.

This MLX5_EXPANSION_IPV6_FRAG_EXT node in RSS expansion graph only helps
RSS expansion function to locate right node in graph from which start to expand.

Fixes 0e5a0d8f7556 ("net/mlx5: support match on IPv6 fragment

extension")
Cc: [email protected]

[1]:
flow create 0 ingress pattern eth / ipv6 / udp dst is 250 / vxlan-gpe / ipv6 / ipv6_frag_ext / end actions rss level 2 types ip end / end

---
 drivers/net/mlx5/mlx5_flow.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 15 lines

drivers/net/mlx5/mlx5_flow.c mlx5_flow_is_rss_expandable_item(const struct · line 138

Quoted 10 lines
drivers/net/mlx5/mlx5_flow.c +1 -0
index 1b682ac8ed..90b8cf6692 100644
@@ -134,6 +134,7 @@ mlx5_flow_is_rss_expandable_item(const struct
 rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_MPLS:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 	case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:

Adding IPV6_FRAG_EXT to the list of expandable is not accurate,
Assuming HW support matching on L4 info after frag - which I think it doesn't.
It will lead that the first frag will get different hash than other frags since it the only one which contain info of L4 header This will lead to different RSS spreading and that's not correct.

No, it will not expand to any items because the .next field is empty of entry MLX5_EXPANSION_IPV6_FRAG_EXT in mlx5_support_expansion[].

-Jack

Quoted 3 lines

Kindest regards,
Raslan Darawsheh

#5 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

Quoted 65 lines

-----Original Message-----
From: Jack Min <[email protected]>
Sent: Wednesday, July 14, 2021 10:31 AM
To: Raslan Darawsheh <[email protected]>
Cc: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>; Ori Kam <[email protected]>; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

On Mon, 21-07-12, 08:05, Raslan Darawsheh wrote:

Hey,

Quoted 19 lines

Hi,

Quoted 17 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaoyu Min
Sent: Wednesday, July 7, 2021 5:33 AM
To: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>; Ori Kam <[email protected]>
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix missing RSS expansion of IPv6 frag

IPV6_FRAG_EXT item is missed for RSS expansion which causes flows like [1] are wrongly expanded.

Different from other items, IPV6_FRAG_EXT hasn't next field because HW only support to do hash of UDP/TCP for non-fragment.

This MLX5_EXPANSION_IPV6_FRAG_EXT node in RSS expansion graph

only

Quoted 17 lines
Quoted 17 lines

helps RSS expansion function to locate right node in graph from which start to expand.

Fixes 0e5a0d8f7556 ("net/mlx5: support match on IPv6 fragment

extension")
Cc: [email protected]

[1]:
flow create 0 ingress pattern eth / ipv6 / udp dst is 250 / vxlan-gpe /
ipv6 / ipv6_frag_ext / end actions rss level 2 types ip end / end

---
 drivers/net/mlx5/mlx5_flow.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 13 lines

drivers/net/mlx5/mlx5_flow.c mlx5_flow_is_rss_expandable_item(const struct · line 138

Quoted 10 lines
(quoted diff) +0 -0

b/drivers/net/mlx5/mlx5_flow.c index 1b682ac8ed..90b8cf6692 100644

drivers/net/mlx5/mlx5_flow.c +1 -0
@@ -134,6 +134,7 @@ mlx5_flow_is_rss_expandable_item(const struct
 rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_MPLS:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 	case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:

Adding IPV6_FRAG_EXT to the list of expandable is not accurate, Assuming HW support matching on L4 info after frag - which I think it

Quoted 8 lines

doesn't.

Quoted 2 lines

It will lead that the first frag will get different hash than other frags since it the only one which contain info of L4 header This will lead to

different RSS spreading and that's not correct.

No, it will not expand to any items because the .next field is empty of entry MLX5_EXPANSION_IPV6_FRAG_EXT in mlx5_support_expansion[].

Great thanks for explanation,

Quoted 4 lines

-Jack

Quoted 3 lines

Kindest regards,
Raslan Darawsheh

Kindest regards
Raslan Darawsheh

#7 lore raw
In reply to Xiaoyu Min

Hi,

Quoted 12 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaoyu Min
Sent: Wednesday, July 7, 2021 5:33 AM
Cc: [email protected]
Subject: [dpdk-dev] [PATCH 0/2] fix RSS expansion missing items

This patch set fixs the missing items in RSS expansion.

Xiaoyu Min (2):
net/mlx5: fix missing RSS expandable items net/mlx5: fix missing RSS expansion of IPv6 frag

Quoted 5 lines
 drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--
2.32.0

Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh