DPDK usage discussions
 help / color / mirror / Atom feed
* Issue with RTE Flow and RSS with i40e on DPDK 24.11
@ 2025-05-06  8:15 Sid ali cherrati
  0 siblings, 0 replies; only message in thread
From: Sid ali cherrati @ 2025-05-06  8:15 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 3273 bytes --]

Dear [Support Team / DPDK Developers / Intel Support],

I hope this message finds you well.

I'm currently developing a server application based on *DPDK 24.11*, using
an *Intel X710 NIC* with the *i40e driver*. In my application, I'm
leveraging *RTE Flow* to filter UDP packets based on specific IP addresses
and ports.

To direct matching traffic, I initially used the *QUEUE action*, but I
observed that only one CPU core reaches 100% utilization, while the others
remain idle. This indicates that *RSS is being bypassed*, resulting in a
processing bottleneck.

To address this, I tried replacing the *QUEUE action* with *RSS*, but I
encountered the following validation error:

*Validation Failure: RSS Queues not supported when pattern specified*

This raises a few questions:

   -

   Is this a known limitation of the i40e driver or the X710 hardware?
   -

   Are there specific pattern constraints that prevent RSS from being used
   in this context?
   -

   Is there a recommended approach to enable per-core packet distribution
   while still applying fine-grained filtering?

Below is a relevant snippet of the flow rule I'm using:

int flow_filtering(uint16_t port_id, uint32_t ip_addr, uint16_t udp_port) {
    struct rte_flow_error error;
    struct rte_flow_attr attr = {
        .ingress = 1,
        .priority = 0
    };
    struct rte_flow_item pattern[4];
    struct rte_flow_action action[2];
    struct rte_flow *flow;

    // Configuration Ethernet
    memset(pattern, 0, sizeof(pattern));
    pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;

    // Configuration IPv4
    struct rte_flow_item_ipv4 ipv4_spec = { .hdr.dst_addr = RTE_BE32(ip_addr) };
    struct rte_flow_item_ipv4 ipv4_mask = { .hdr.dst_addr =
RTE_BE32(0xFFFFFFFF) };
    pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
    pattern[1].spec = &ipv4_spec;
    pattern[1].mask = &ipv4_mask;

    // Configuration UDP
    struct rte_flow_item_udp udp_spec = { .hdr.dst_port = RTE_BE16(udp_port) };
    struct rte_flow_item_udp udp_mask = { .hdr.dst_port = RTE_BE16(0xFFFF) };
    pattern[2].type = RTE_FLOW_ITEM_TYPE_UDP;
    pattern[2].spec = &udp_spec;
    pattern[2].mask = &udp_mask;

    pattern[3].type = RTE_FLOW_ITEM_TYPE_END;

    // Configuration RSS
    uint16_t rss_queues[] = {0, 1, 2, 3, 4, 5};
        struct rte_flow_action_rss rss_conf = {
        .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
        .types = RTE_ETH_RSS_NONFRAG_IPV4_UDP,
        .key_len = 0,
        .queue_num = 6,
        .queue = rss_queues
    };

    action[0].type = RTE_FLOW_ACTION_TYPE_RSS;
    action[0].conf = &rss_conf;
    action[1].type = RTE_FLOW_ACTION_TYPE_END;

    if (rte_flow_validate(port_id, &attr, pattern, action, &error) != 0) {
        printf("Validation failed: %s\n", error.message);
        return -1;
    }
        flow = rte_flow_create(port_id, &attr, pattern, action, &error);
    if (flow == NULL) {
        printf("Error creating flow rule: %s\n", error.message);
        return -1;
    }

    printf("Flow rule created for IP %u.%u.%u.%u and UDP port %u\n",
           (ip_addr >> 24) & 0xFF, (ip_addr >> 16) & 0xFF,
           (ip_addr >> 8) & 0xFF, ip_addr & 0xFF, udp_port);

    return 0;
}

Any guidance or clarification would be greatly appreciated.

Best regards,

Sid-Ali

[-- Attachment #2: Type: text/html, Size: 27022 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-06  8:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-06  8:15 Issue with RTE Flow and RSS with i40e on DPDK 24.11 Sid ali cherrati

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