DPDK usage discussions
 help / color / mirror / Atom feed
* DPDK: Create multiple RSS flows with unique set of queues for different patterns
@ 2024-08-08 11:19 Raghavan V
  2024-08-08 18:55 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Raghavan V @ 2024-08-08 11:19 UTC (permalink / raw)
  To: dev, users

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-08 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-08 11:19 DPDK: Create multiple RSS flows with unique set of queues for different patterns Raghavan V
2024-08-08 18:55 ` Stephen Hemminger

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).