From patchwork Tue Sep 12 10:00:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 131344 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C119E42575; Tue, 12 Sep 2023 03:41:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29F7B40648; Tue, 12 Sep 2023 03:40:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8D52340648 for ; Tue, 12 Sep 2023 03:40:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694482846; x=1726018846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=seL/k6pFyWSPBfy7PJ05SM9W2sQi5YGx7nnMnR3k/dg=; b=Y/Bw2dUJ7ruhqeel0rADpe6Ex9VELw3wigmqz+yC18SRMK2p/GOrk2oQ TY92pyWd5wwFPSmPDYIn8vh3iLex9zfUNvThQgcQFZ03lOGMq1bb2uvbo ivmFXzgV+KHWoLbjt2qMLdqKa+qB8fMk0/ZzTWtutcYaf7Fem7TnMfsbF RuV0yDWFyWzUgNiyxbMzvgIBgksNufGrsKLxVpuxGKWYUgMCR3OyNJSQH mO64oKDRNP9nta3UhK5gBMNtIGhs+ABEXXJPSoBiYdG1mnkK/vpyjuT9j XizDgYnCZMkL7G4Za5zs1uAVl3oSyIY9S+yHU0+44nDpKeANLY/Okn9KO w==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="382063166" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="382063166" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 18:40:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="867168330" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="867168330" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.37]) by orsmga004.jf.intel.com with ESMTP; 11 Sep 2023 18:40:44 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: zhichaox.zeng@intel.com, dev@dpdk.org, Qi Zhang Subject: [PATCH v3 5/5] doc: add generic flow doc for ice PMD Date: Tue, 12 Sep 2023 06:00:41 -0400 Message-Id: <20230912100041.3697012-6-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230912100041.3697012-1-qi.z.zhang@intel.com> References: <20230814202616.3346652-1-qi.z.zhang@intel.com> <20230912100041.3697012-1-qi.z.zhang@intel.com> MIME-Version: 1.0 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 Add some about document about the how to use rte_flow on ice PMD. Signed-off-by: Qi Zhang --- doc/guides/nics/ice.rst | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index 5a47109c3f..b36a4c260a 100644 --- a/doc/guides/nics/ice.rst +++ b/doc/guides/nics/ice.rst @@ -301,6 +301,51 @@ The DCF PMD needs to advertise and acquire DCF capability which allows DCF to send AdminQ commands that it would like to execute over to the PF and receive responses for the same from PF. +Generic Flow Support +~~~~~~~~~~~~~~~~~~~~ + +The ice PMD provides support for the Generic Flow API (RTE_FLOW), enabling +users to offload various flow classification tasks to the E810 NIC. +The E810 NIC's packet processing pipeline consists of the following stages: + +Switch: Supports exact match and limited wildcard matching with a large flow +capacity. + +ACL: Supports wildcard matching with a smaller flow capacity (DCF mode only). + +FDIR: Supports exact match with a large flow capacity (PF mode only). + +Hash: Supports RSS (PF mode only) + +The ice PMD utilizes the ice_flow_engine structure to represent each of these +stages and leverages the rte_flow rule's ``group`` attribute for selecting the +appropriate engine for Switch, ACL, and FDIR operations: + +Group 0 maps to Switch +Group 1 maps to ACL +Group 2 maps to FDIR + +In the case of RSS, it will only be selected if a ``RTE_FLOW_ACTION_RSS`` action +is targeted to no queue group, and the group attribute is ignored. + +For each engine, a list of supported patterns is maintained in a global array +named ``ice__supported_pattern``. The Ice PMD will reject any rule with +a pattern that is not included in the supported list. + +One notable feature is the ice PMD's ability to leverage the Raw pattern, +enabling protocol-agnostic flow offloading. Here is an example of creating +a rule that matches an IPv4 destination address of 1.2.3.4 and redirects it to +queue 3 using a raw pattern: + +flow create 0 ingress group 2 pattern raw \ +pattern spec \ +00000000000000000000000008004500001400004000401000000000000001020304 \ +pattern mask \ +000000000000000000000000000000000000000000000000000000000000ffffffff \ +end actions queue index 3 / mark id 3 / end + +Currently, raw pattern support is limited to the FDIR and Hash engines. + Additional Options ++++++++++++++++++