From: Xiaoyu Min <jackmin@nvidia.com>
To: Matan Azrad <matan@nvidia.com>,
Shahaf Shuler <shahafs@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS
Date: Fri, 2 Jul 2021 16:34:48 +0800 [thread overview]
Message-ID: <047f5aa4a26b27f25ad9f5733106c503ccd32f87.1625213344.git.jackmin@nvidia.com> (raw)
In-Reply-To: <cover.1625213344.git.jackmin@nvidia.com>
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
next prev parent reply other threads:[~2021-07-02 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-07-06 12:02 ` [dpdk-dev] [PATCH 0/3] MPLS RSS fixs Matan Azrad
2021-07-06 15:36 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=047f5aa4a26b27f25ad9f5733106c503ccd32f87.1625213344.git.jackmin@nvidia.com \
--to=jackmin@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=shahafs@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).