From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2A0646477 for ; Tue, 25 Mar 2025 11:42:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35F5040B9C; Tue, 25 Mar 2025 11:42:45 +0100 (CET) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by mails.dpdk.org (Postfix) with ESMTP id 60A244027C for ; Tue, 25 Mar 2025 11:42:44 +0100 (CET) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-6ff2adbba3fso39856667b3.2 for ; Tue, 25 Mar 2025 03:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742899363; x=1743504163; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5IZgEPvSnOUGBVQvtLEEWT1Lhio+uTo+NJyR4ZNUKPw=; b=TDknVq4LVCbA2bgWDoF9LotKOsU7ny5CkWVRapBUC8QDK87+EmijvuWnQP+SDmS1S5 CtvlLDxWKwh/lROecTPVyIVcCUbRqeqWisdlpZgyqYUGE++x6NDhCbzQwSPB89NVC7zf PXMoWmt4mI33jaoF6jbV0RVYSTj9uS2yNO4Xb+7VW3+WkBis0qipvCjXPlZDYiiAVo/i apoVZdrfQ4sDMmV7RO34yzuOL505dwVQlHXPbfR1F1DmMzFQPNIuPuAcSmt6J28OShb3 NKzZcZ0Qyw3hi2p6EQXU1B81fothMOicL/9FZ/BTB6+F6Eb1jy5EQkGoqz5DXEfTM1TW t6JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742899363; x=1743504163; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5IZgEPvSnOUGBVQvtLEEWT1Lhio+uTo+NJyR4ZNUKPw=; b=O9jNjk3BR8PAOmkwlEQV7wfOpYgL/1NvdyrnPyn61YjNxQT2CaOhe0WvJJVNB+rgh8 vUqe+fky7V3Ri7neSsUeIKw8AMKVWMZmTLCLICRh1W24UoA4g155rmoigPuZoVB+lGmL nv7Ll0dLI+NwnEKpDumjrqNyBEgcjniU9w5ycoRlNnkURo8bvnpz8l25krTJvmPoEvYD +J3oPetm/A15mZJtz3H2nS8RkJ/+HRmq3zO+vnIYZfOIRYZMB6XqoFvVF/9UF4ZtXnRN 6fFVnFy6jpcAeLgIsASDtNiRat7dKOoWy/ZOTv288M/l6eE0U1UDE7nmBO9uJlba0U9F zBkw== X-Gm-Message-State: AOJu0Yzdr7fH+ejHdkP1HYwAcxGIQagzGq+H7uH1ZU9dX1D6FYZ3BLS3 BjKPKX5JGe1aaZ1DtilI+CMpm/rhy3pBy4u9lbe95XucQGH2v4KoNhQ0nln1pSX7P8e+GcBwXlI 5+j/zCmZ+lFl5Lk+79UMj1yL4W48yUVNM X-Gm-Gg: ASbGncvl/NNB3VK7/nxiEn6+uAwkTMtpR7N/MNZDvTLzazi+R6kV+PkLrrX/NAk4r3f QhTwQ7LiZm8kJjF2H9VTj72nZRhoF2Yiqg5j7I0vkDu0K79pqQ2xo+HuZOxCphMHuGSvfd7xFbU VnQOaxxTyNpC+OfbalJDvTbAckMHc= X-Google-Smtp-Source: AGHT+IGvvJi4MVdAac7G+EKax4XOh2rkqQswme7Rp1g1qRm/uuGJDQTagSsKU+67hH6ASBTXdY/6vMwllx0fUJ/ZF0g= X-Received: by 2002:a05:690c:dcf:b0:6fb:916c:a33c with SMTP id 00721157ae682-700bad443f9mr217361617b3.34.1742899363232; Tue, 25 Mar 2025 03:42:43 -0700 (PDT) MIME-Version: 1.0 From: Sid ali cherrati Date: Tue, 25 Mar 2025 11:42:31 +0100 X-Gm-Features: AQ5f1JrGHgMyh3Wvt5XlwvpglwzVfDhdVtwJMBjFzEoFMzBgHR7Y8Ehpwhk0Rsw Message-ID: Subject: RSS/Flow Rule Configuration Issue on Intel X710 (i40e Driver) To: users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000006cc35f063128619c" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000006cc35f063128619c Content-Type: text/plain; charset="UTF-8" Dear DPDK Team, I hope this message finds you well. I am reaching out to seek your expertise regarding an issue I am encountering while configuring *DPDK flow rules with RSS* on an *Intel X710 NIC* (using the i40e driver). Despite multiple attempts, I have been unable to resolve the error and would greatly appreciate your guidance. *Objective* : Redirect UDP traffic (specific destination IP/port) to *multiple RX queues* using rte_flow with RSS. *Error : * Validation failed: RSS Queues not supported when pattern specified . *Hardware/Software*: - NIC: Intel X710 - Driver: i40e - DPDK Version: 23.11 *Code Snippet:* 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; // Ethernet memset(pattern, 0, sizeof(pattern)); pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; // 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; // 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; // action action[0].type = RTE_FLOW_ACTION_TYPE_RSS; // struct rte_flow_action_queue queue_action = { .index = RX_ID }; // action[0].conf = &queue_action; // Configuration RSS uint16_t queues[] = {1, 2, 3}; struct rte_flow_action_rss rss_conf = { .func = RTE_ETH_HASH_FUNCTION_DEFAULT, .types = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_UDP, .key_len = 0, .queue_num = 3, .queue = 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 Failure: %s\n", error.message); return -1; } // Flow rule creation 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; } I would be grateful for any insights, code examples, or documentation references to resolve this issue. Please let me know if additional details are required. Thank you in advance for your time and support. Best regards, SidAli --0000000000006cc35f063128619c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear DPDK Team,

=
I hope this message finds you well. I am reaching out to seek your=20 expertise regarding an issue I am encountering while configuring DPDK fl= ow rules with RSS on an Intel X710 NIC (using the i40e driver). Despite multiple attempts, I have been unable to resolve the e= rror and would greatly appreciate your guidance.

<= b>Objective :
Redirect UDP traffic (specific destination IP/p= ort) to multiple RX queues using rte_flow with RSS.
=
Error :
Validation failed: RSS Queues not support= ed when pattern specified .

Hardware/Software:

  • NIC: Intel X710

  • Driver: i40e
  • DPDK Version: 23.11

Code Snippet:
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 =3D { .ingress= =3D = 1, .priority= =3D 0 };
= struct rte_flow_item<= /span> pattern[4];
= struct rte_f= low_action action[2];
struct rte_flow *flow;

// Ethernet
memset(pattern, 0, sizeof(= pattern));
<= span style=3D"color:rgb(204,204,204)"> pattern[<= span style=3D"color:rgb(181,206,168)">0].type =3D RTE_FLOW_ITEM_TYPE_ETH;

// IPv4
struct rte_flow_item_ipv4 ipv4_spec =3D { .hdr.= dst_addr =3D RTE_BE32(= ip_addr) };
= struct rte_flow_item_ipv4 ipv= 4_mask =3D {= .hdr.dst_ad= dr =3D RTE_BE32(0xFFFFFFF= F) };
pattern[1].type = =3D RTE_FLOW_ITEM_TYPE_IPV4;
= pattern[1].spec = =3D &ipv4_spec;
= pattern[= 1].mask =3D &= ipv4_mask;

// UDP
<= div> struct rte_flow_item_udp = udp_spec =3D { .hdr.= dst_port =3D RTE_BE16(= udp_port) };
struct <= span style=3D"color:rgb(78,201,176)">rte_flow_item_udp udp= _mask =3D { = .hdr.dst_por= t =3D RTE_BE16(0xFFFF) };
pattern[2= ].type =3D RTE_FLOW_ITEM_TYPE_UDP;
pattern[2<= span style=3D"color:rgb(204,204,204)">].spec =3D &udp_spec;
pattern[2= ].mask =3D &udp_mask;


pattern[3].type =3D RTE_FLOW_ITE= M_TYPE_END;

<= div> // action
action[0].type =3D RTE_F= LOW_ACTION_TYPE_RSS;
// struct rte_flow_action_queue queue_action =3D { .i= ndex =3D RX_ID };
// action[0].conf =3D &am= p;queue_action;
= // Configuration RSS
uint16_t queues[] =3D {1, 2, 3};

= struct rte_flo= w_action_rss rss_conf =3D {
.func =3D RTE_ETH_HASH_FUNCTION_DEFAULT,
.t= ypes =3D
RTE_ETH_RSS_IPV4 |
RTE_ETH_RSS_UDP,
.key_len =3D 0,
.queue_num =3D 3,
<= div> .queue = =3D queues,
};

actio= n[0].= type =3D RTE_FLOW_ACTION_TYPE_RSS;
action[0].conf =3D = &rss_conf;
action[1].type =3D = RTE_FLOW_ACTION_TYPE_END;
if (rte_flow_validate(port_id, &attr, pattern, action, &error) !=3D 0) {
p= rintf("Validation Failure: %s\n", error.message);
return -1= ;
}
// Flow rule creation
flow =3D rte_flow_create(port_id= , &attr<= span style=3D"color:rgb(204,204,204)">, pattern, action, &<= span style=3D"color:rgb(156,220,254)">error);
= if (flow =3D=3D NULL) {
= printf("Error creating flow rule : %s\n", error.message);
<= span style=3D"color:rgb(204,204,204)"> return -1;
<= div> }

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

return 0= ;
}

I would be grateful for any insights, code examples, or documenta= tion references to resolve this issue. Please let me know if additional=20 details are required.

Thank you in advance for your time and support.=

Best regards,

SidAli


--0000000000006cc35f063128619c--