DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, stable@dpdk.org
Subject: [PATCH v2] net/ice: fix flow engines order
Date: Mon, 10 Mar 2025 17:40:28 +0000	[thread overview]
Message-ID: <20250310174028.876789-1-vladimir.medvedkin@intel.com> (raw)
In-Reply-To: <20250301205327.569853-1-vladimir.medvedkin@intel.com>

Reorder flow engine evaluation for RTE flow rule installation.
Currently, the driver evaluates rules with engines in the order they are
executed in the hardware. However, in this situation, some wildcarded flows
that are also supported by the ACL engine are installed as switch engine
rules, which scales poorly with each distinct wildcard mask configuration.

Fixes: fabc9e1322e2 ("net/ice: fix flows handling")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 drivers/net/intel/ice/ice_generic_flow.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c
index 5c34e0385f..4049157eab 100644
--- a/drivers/net/intel/ice/ice_generic_flow.c
+++ b/drivers/net/intel/ice/ice_generic_flow.c
@@ -2239,9 +2239,9 @@ static struct ice_flow_parser *get_flow_parser(uint32_t group)
 {
 	switch (group) {
 	case 0:
-		return &ice_switch_parser;
-	case 1:
 		return &ice_acl_parser;
+	case 1:
+		return &ice_switch_parser;
 	case 2:
 		return &ice_fdir_parser;
 	default:
@@ -2298,6 +2298,13 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
 	}
 
 	for (int i = 0; i < ICE_FLOW_ENGINE_NB; i++) {
+		/**
+		 * Evaluate parsers in the following order:
+		 * ACL - for some subset of wildcard matching rules
+		 * Switch - This engine is placed after ACL because
+		 * it scales worse than ACL for different wildcard masks.
+		 * FDIR - for exact match rules
+		 **/
 		parser = get_flow_parser(i);
 		if (parser == NULL) {
 			rte_flow_error_set(error, EINVAL,
-- 
2.43.0


      reply	other threads:[~2025-03-10 17:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-01 20:53 [PATCH] " Vladimir Medvedkin
2025-03-10 17:40 ` Vladimir Medvedkin [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=20250310174028.876789-1-vladimir.medvedkin@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@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).