From: Stephen Hemminger <stephen@networkplumber.org>
To: Raghavan V <Raghavan.V2@tatacommunications.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: DPDK: Create multiple RSS flows with unique set of queues for different patterns
Date: Thu, 8 Aug 2024 11:55:12 -0700 [thread overview]
Message-ID: <20240808115512.2e683c7f@hermes.local> (raw)
In-Reply-To: <TYZPR04MB5416ECB3068C101174108712C8B92@TYZPR04MB5416.apcprd04.prod.outlook.com>
On Thu, 8 Aug 2024 11:19:13 +0000
Raghavan V <Raghavan.V2@tatacommunications.com> wrote:
> Hi Team,
>
> Is there any possible way to create multiple RSS flows to distribute packets to set of queues when a particular Ip pattern matches.
> For e.g.,
> I have 40 RX queues setup,
> Flow 1: Match a particular IP pattern and distribute it to specified RX queues set (0 - 29)
> Flow 2: Match a particular IP pattern and distribute it to specified RX queues set (30 - 39)
You need to address what to with packets that do match either of the patterns.
Usually best to reserve one queue (0) for those.
>
> Is the below code snippet possible? Also is it possible to use symmetric toeplitz hash and ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY and let me know any other config should be included.
That is HW dependent I suspect most hardware doesn't support it. Probably only mlx5.
You are best to read the driver source to find out if you want to do special case like this.
>
> uint16_t queue_indices[] = {0,...29};
> uint16_t queue_indices2[] = {30,..39};
>
> action_rss1 = (struct rte_flow_action_rss){
> .types = rss_conf.rss_hf,
> .key_len = rss_conf.rss_key_len,
Usually best to go with default rss_key and leave key_len and key as default of 0.
> .queue_num = 30,
> .key = rss_key,
> .queue = queue_indices,
> };
>
> action_rss2 = (struct rte_flow_action_rss){
> .types = rss_conf.rss_hf,
> .key_len = rss_conf.rss_key_len,
> .queue_num = 10,
> .key = rss_key,
> .queue = queue_indices2,
> };
>
> struct rte_flow_item pattern[] = {
> [0]={
> .type = RTE_FLOW_ITEM_TYPE_ETH,
>
> },
> [1]={
> .type = RTE_FLOW_ITEM_TYPE_IPV4,
> .spec = &ipv4_spec,
> .mask = &ipv4_mask,
>
>
> },
> [2]={
> .type = RTE_FLOW_ITEM_TYPE_UDP,
> },
>
> [3]={
> .type = RTE_FLOW_ITEM_TYPE_END,
> }
> };
> struct rte_flow_item pattern2[] = {
> [0]={
> .type = RTE_FLOW_ITEM_TYPE_ETH,
>
> },
>
> [1]={
> .type = RTE_FLOW_ITEM_TYPE_IPV4,
> .spec = &ipv4_spec2,
> .mask = &ipv4_mask2,
>
>
> },
> [2]={
> .type = RTE_FLOW_ITEM_TYPE_UDP,
> },
>
> [3]={
> .type = RTE_FLOW_ITEM_TYPE_END,
> }
> };
> rte_flow_validate(bond_port, &attr, pattern, action_rss1, &error);
> rte_flow_create(bond_port, &attr, pattern, action_rss1, &error);
>
> rte_flow_validate(bond_port, &attr, pattern2, action_rss2, &error);
> rte_flow_create(bond_port, &attr, pattern2, action_rss2, &error);
>
>
> Pls let me know any other approach will match my requirement.
>
> Thanks,
> Raghavan V
>
prev parent reply other threads:[~2024-08-08 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 11:19 Raghavan V
2024-08-08 18:55 ` Stephen Hemminger [this message]
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=20240808115512.2e683c7f@hermes.local \
--to=stephen@networkplumber.org \
--cc=Raghavan.V2@tatacommunications.com \
--cc=dev@dpdk.org \
--cc=users@dpdk.org \
/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).