From: Raghavan V <Raghavan.V2@tatacommunications.com>
To: "dev@dpdk.org" <dev@dpdk.org>, "users@dpdk.org" <users@dpdk.org>
Subject: DPDK: Create multiple RSS flows with unique set of queues for different patterns
Date: Thu, 8 Aug 2024 11:19:13 +0000 [thread overview]
Message-ID: <TYZPR04MB5416ECB3068C101174108712C8B92@TYZPR04MB5416.apcprd04.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2682 bytes --]
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)
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.
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,
.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
[-- Attachment #2: Type: text/html, Size: 13534 bytes --]
next reply other threads:[~2024-08-08 11:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 11:19 Raghavan V [this message]
2024-08-08 18:55 ` Stephen Hemminger
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=TYZPR04MB5416ECB3068C101174108712C8B92@TYZPR04MB5416.apcprd04.prod.outlook.com \
--to=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).