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 208B44614F; Thu, 30 Jan 2025 16:50:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0791C40275; Thu, 30 Jan 2025 16:50:24 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id 5924D4025A; Thu, 30 Jan 2025 16:50:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738252223; x=1769788223; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=C2aOc1l39D9OeevWDNwJ3XWzfskDZOJg4pH03Yq1HtM=; b=MrFc7PZr/2BJ8eZymt3pvs/K3rBqEL30CAGtFxUdgC2I48GlNZiRoAFF d3A9ofgcF7Jri/1QxqMof2xqD0QhYaUezEFiXWZ/Rmt+IAd6S4vw1uKlw 4JiUFb3/PuOT1UCG/qXpRDV9DBmvst9HTRqCXhqr8f4byUMHiEHju5ybG cRB8z11E/yrGz346FnPZCzFcsjIqRFIwoMahcO9828zJE0Fk0Omvgtsg4 FigMKl1caiYDq5p7CXPw73dkjRsTx13NA8SCWQgZPQlvtcHcB8I2n/Nw2 hkNjkNTnmyB+kPZaWycmoyYjWMtAbdnJpS4LfXpJK6atI0xfmJK7OCHuk g==; X-CSE-ConnectionGUID: HCGtRHvsQeiN1txWeRZmCg== X-CSE-MsgGUID: UCkc3jrWSkmBLuDV6NhG0w== X-IronPort-AV: E=McAfee;i="6700,10204,11331"; a="38506379" X-IronPort-AV: E=Sophos;i="6.13,245,1732608000"; d="scan'208";a="38506379" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2025 07:50:21 -0800 X-CSE-ConnectionGUID: HifYcuN8RTSv/fYCopxihg== X-CSE-MsgGUID: rnIFQSNEQZeGpl1Ls+5BgQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="109815399" Received: from unknown (HELO silpixa00401176.ir.intel.com) ([10.243.23.51]) by orviesa007.jf.intel.com with ESMTP; 30 Jan 2025 07:50:19 -0800 From: Vladimir Medvedkin To: dev@dpdk.org Cc: kai.ji@intel.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, qi.z.zhang@intel.com, stable@dpdk.org Subject: [PATCH] net/ice: fix how ice driver handles flows Date: Thu, 30 Jan 2025 15:50:11 +0000 Message-ID: <20250130155011.2658800-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently ICE PMD uses group attribute to select the appropriate HW engine to offload the flow. This behavior violates the rte_flow API, existing documentation/examples, and reveals hardware specific details. This patch eliminates the use of the group attribute and runs each engine parser in the order they work in the HW pipeline. Fixes: 9c5f0070fa3f ("net/ice: map group to pipeline stage") Cc: qi.z.zhang@intel.com Cc: stable@dpdk.org Signed-off-by: Vladimir Medvedkin --- drivers/net/ice/ice_generic_flow.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index 50d760004f..666c8f3cb9 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -2295,21 +2295,22 @@ ice_flow_process_filter(struct rte_eth_dev *dev, return 0; } - parser = get_flow_parser(attr->group); - if (parser == NULL) { - rte_flow_error_set(error, EINVAL, - RTE_FLOW_ERROR_TYPE_ATTR, - NULL, "NULL attribute."); - return -rte_errno; + for (int i = 0; i < 3; i++) { + parser = get_flow_parser(i); + if (parser == NULL) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ATTR, + NULL, "NULL attribute."); + return -rte_errno; + } + if (ice_parse_engine(ad, flow, parser, attr->priority, + pattern, actions, error)) { + *engine = parser->engine; + return 0; + } } - if (ice_parse_engine(ad, flow, parser, attr->priority, - pattern, actions, error)) { - *engine = parser->engine; - return 0; - } else { - return -rte_errno; - } + return -rte_errno; } static int -- 2.43.0