* [dpdk-dev] [PATCH 0/3] MPLS RSS fixs
@ 2021-07-02 8:34 Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix MPLS over IP Xiaoyu Min
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Xiaoyu Min @ 2021-07-02 8:34 UTC (permalink / raw)
Cc: dev
This patch set fixs several problems of MPLS RSS:
- removed MPLSoIP(HW doesn't support) related code
- support MPLSoUDP, MPLSoGRE RSS expansion
- reduced number of expanded sub-flows for inner MPLS
Xiaoyu Min (3):
net/mlx5: fix MPLS over IP
net/mlx5: fix MPLS RSS expansion
net/mlx5: limit inner RSS expansion for MPLS
drivers/net/mlx5/mlx5_flow.c | 31 +++++++++++++++++++++----------
drivers/net/mlx5/mlx5_flow_dv.c | 3 ---
2 files changed, 21 insertions(+), 13 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 1/3] net/mlx5: fix MPLS over IP
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
@ 2021-07-02 8:34 ` Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix MPLS RSS expansion Xiaoyu Min
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Xiaoyu Min @ 2021-07-02 8:34 UTC (permalink / raw)
To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Dekel Peled; +Cc: dev, stable
HW doesn't support match MPLS over IP traffic.
Remove related code.
Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 5 ++---
drivers/net/mlx5/mlx5_flow_dv.c | 3 ---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3b7c94d92f..21032a29a3 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2920,9 +2920,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
"MPLS not supported or"
" disabled in firmware"
" configuration.");
- /* MPLS over IP, UDP, GRE is allowed */
- if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 |
- MLX5_FLOW_LAYER_OUTER_L4_UDP |
+ /* MPLS over UDP, GRE is allowed */
+ if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L4_UDP |
MLX5_FLOW_LAYER_GRE |
MLX5_FLOW_LAYER_GRE_KEY)))
return rte_flow_error_set(error, EINVAL,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a04a3c2bb8..86ba9ffde3 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9032,9 +9032,6 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
RTE_ETHER_TYPE_MPLS);
break;
default:
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_protocol, 0xff);
- MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
- IPPROTO_MPLS);
break;
}
if (!in_mpls_v)
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 2/3] net/mlx5: fix MPLS RSS expansion
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix MPLS over IP Xiaoyu Min
@ 2021-07-02 8:34 ` Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS Xiaoyu Min
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Xiaoyu Min @ 2021-07-02 8:34 UTC (permalink / raw)
To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
Nelio Laranjeiro, Yongseok Koh
Cc: dev, stable
MPLSoUDP and MPLSoGRE are supported by PMD from
rte flow point of view.
RSS expansion doesn't support above but, instead, supports
normal MPLS over L2, which actually will be rejected by PMD.
This patch removes RSS expansion support of the MPLS over L2
and adds support of MPLSoUDP and MPLSoGRE.
In addition to above, support for eth over MPLS expansion is
added too.
Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 21032a29a3..a13b89e3a7 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -131,6 +131,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_NVGRE:
case RTE_FLOW_ITEM_TYPE_GRE:
case RTE_FLOW_ITEM_TYPE_GENEVE:
+ case RTE_FLOW_ITEM_TYPE_MPLS:
return true;
default:
break;
@@ -474,8 +475,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_ETH] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_OUTER_IPV4,
- MLX5_EXPANSION_OUTER_IPV6,
- MLX5_EXPANSION_MPLS),
+ MLX5_EXPANSION_OUTER_IPV6),
.type = RTE_FLOW_ITEM_TYPE_ETH,
.rss_types = 0,
},
@@ -503,7 +503,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_IPV4_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
- MLX5_EXPANSION_VXLAN_GPE),
+ MLX5_EXPANSION_VXLAN_GPE,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
},
@@ -525,7 +526,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_IPV6_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
- MLX5_EXPANSION_VXLAN_GPE),
+ MLX5_EXPANSION_VXLAN_GPE,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
},
@@ -548,12 +550,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_GRE] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
MLX5_EXPANSION_IPV6,
- MLX5_EXPANSION_GRE_KEY),
+ MLX5_EXPANSION_GRE_KEY,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_GRE,
},
[MLX5_EXPANSION_GRE_KEY] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
- MLX5_EXPANSION_IPV6),
+ MLX5_EXPANSION_IPV6,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_GRE_KEY,
.optional = 1,
},
@@ -563,7 +567,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_MPLS] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
- MLX5_EXPANSION_IPV6),
+ MLX5_EXPANSION_IPV6,
+ MLX5_EXPANSION_ETH),
.type = RTE_FLOW_ITEM_TYPE_MPLS,
},
[MLX5_EXPANSION_ETH] = {
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix MPLS over IP Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix MPLS RSS expansion Xiaoyu Min
@ 2021-07-02 8:34 ` Xiaoyu Min
2021-07-06 12:02 ` [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Matan Azrad
2021-07-06 15:36 ` Raslan Darawsheh
4 siblings, 0 replies; 6+ messages in thread
From: Xiaoyu Min @ 2021-07-02 8:34 UTC (permalink / raw)
To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko; +Cc: dev
If user wants to do MPLS inner RSS and only provides pattern
till MPLS without inner items [1], RSS expansion will expand flows
into 13 sub-flows[2] which is too many and it impacts flow insert
rate, stack usage becomes large as well.
This expansion into 13 sub-flows seems not worthy of and it can
be significantly reduced (i.e, 7 sub-flows [3]) by user providing
at least one inner L2/L3 item [4].
[1]:
pattern eth / ipv4 / udp / mpls / end actions rss type tcp udp ip
end level 2 / end
[2]:
eth / ipv4 / udp / mpls
eth / ipv4 / udp / mpls / ipv4
eth / ipv4 / udp / mpls / ipv4 / udp
eth / ipv4 / udp / mpls / ipv4 / tcp
eth / ipv4 / udp / mpls / ipv6
eth / ipv4 / udp / mpls / ipv6 / udp
eth / ipv4 / udp / mpls / ipv6 / tcp
eth / ipv4 / udp / mpls / eth / ipv4
eth / ipv4 / udp / mpls / eth / ipv4 / udp
eth / ipv4 / udp / mpls / eth / ipv4 / tcp
eth / ipv4 / udp / mpls / eth / ipv6
eth / ipv4 / udp / mpls / eth / ipv6 / udp
eth / ipv4 / udp / mpls / eth / ipv6 / tcp
[3]:
eth / ipv4 / udp / mpls / eth
eth / ipv4 / udp / mpls / eth / ipv4 / udp
eth / ipv4 / udp / mpls / eth / ipv4 / tcp
eth / ipv4 / udp / mpls / eth / ipv6
eth / ipv4 / udp / mpls / eth / ipv6 / udp
eth / ipv4 / udp / mpls / eth / ipv6 / tcp
[4]:
pattern eth / ipv4 / udp / mpls / eth / end actions rss type tcp udp ip
level 2 / end
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a13b89e3a7..673e7d55fc 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1671,6 +1671,13 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
"RSS on eCPRI is not supported now");
}
+ if ((item_flags & MLX5_FLOW_LAYER_MPLS) &&
+ !(item_flags &
+ (MLX5_FLOW_LAYER_INNER_L2 | MLX5_FLOW_LAYER_INNER_L3)) &&
+ rss->level > 1)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+ "MPLS inner RSS needs to specify inner L2/L3 items after MPLS in pattern");
return 0;
}
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] MPLS RSS fixs
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
` (2 preceding siblings ...)
2021-07-02 8:34 ` [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS Xiaoyu Min
@ 2021-07-06 12:02 ` Matan Azrad
2021-07-06 15:36 ` Raslan Darawsheh
4 siblings, 0 replies; 6+ messages in thread
From: Matan Azrad @ 2021-07-06 12:02 UTC (permalink / raw)
To: Jack Min; +Cc: dev
From: Xiaoyu Min
> This patch set fixs several problems of MPLS RSS:
>
> - removed MPLSoIP(HW doesn't support) related code
> - support MPLSoUDP, MPLSoGRE RSS expansion
> - reduced number of expanded sub-flows for inner MPLS
>
> Xiaoyu Min (3):
> net/mlx5: fix MPLS over IP
> net/mlx5: fix MPLS RSS expansion
> net/mlx5: limit inner RSS expansion for MPLS
Series-acked by Matan Azrad <matan@nvidia.com>
> drivers/net/mlx5/mlx5_flow.c | 31 +++++++++++++++++++++----------
> drivers/net/mlx5/mlx5_flow_dv.c | 3 ---
> 2 files changed, 21 insertions(+), 13 deletions(-)
>
> --
> 2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] MPLS RSS fixs
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
` (3 preceding siblings ...)
2021-07-06 12:02 ` [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Matan Azrad
@ 2021-07-06 15:36 ` Raslan Darawsheh
4 siblings, 0 replies; 6+ messages in thread
From: Raslan Darawsheh @ 2021-07-06 15:36 UTC (permalink / raw)
To: Jack Min; +Cc: dev
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyu Min
> Sent: Friday, July 2, 2021 11:35 AM
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 0/3] MPLS RSS fixs
>
> This patch set fixs several problems of MPLS RSS:
>
> - removed MPLSoIP(HW doesn't support) related code
> - support MPLSoUDP, MPLSoGRE RSS expansion
> - reduced number of expanded sub-flows for inner MPLS
>
> Xiaoyu Min (3):
> net/mlx5: fix MPLS over IP
> net/mlx5: fix MPLS RSS expansion
> net/mlx5: limit inner RSS expansion for MPLS
>
> drivers/net/mlx5/mlx5_flow.c | 31 +++++++++++++++++++++----------
> drivers/net/mlx5/mlx5_flow_dv.c | 3 ---
> 2 files changed, 21 insertions(+), 13 deletions(-)
>
> --
> 2.32.0
Series applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-06 15:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 8:34 [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix MPLS over IP Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 2/3] net/mlx5: fix MPLS RSS expansion Xiaoyu Min
2021-07-02 8:34 ` [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS Xiaoyu Min
2021-07-06 12:02 ` [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Matan Azrad
2021-07-06 15:36 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).