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 50CA543A2C; Thu, 1 Feb 2024 03:30:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E666A4028A; Thu, 1 Feb 2024 03:30:35 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2080.outbound.protection.outlook.com [40.107.243.80]) by mails.dpdk.org (Postfix) with ESMTP id 8ACA240275 for ; Thu, 1 Feb 2024 03:30:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fCFc4A7gZb7HQSFiKT0y9Ztg+5MLTZoP5NYoyeoxO5gtPS68HM1Vvw4icoavaFc4P+2NTY/Fcjt3/kHQDqJKYBPTUlKGtxDCGYZ06XH4zA7xtHIlG+/ID8NeATVQ4+zKDaJ4Ouu5XeeuWQ9isoRqHxoEFYbjeYGAA91CuZFb24zpTPQzb0MU43EecrFfliIRRBbXPmJG9ohBGdMdptIaprG4DObYbJy5PqNRnbK4Dulzn6RbtdbUAd8U6NwCWT8Y0P+Kpp1zO5Heu5DzcJokbyGfJpk4mFYmhMfcHE5r5iYCA+hX8Q9aLwiZGkpLhYPdkooAar+cJJ3r3GDE7T5+ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+AMAKyc+rYDXhXFHcAn2WTtC+UrtvmSO+7ceb7VHPrY=; b=WE+/jlUxM7+VF1aKY0nzZmMvUeUjQIW7EoZH3S32rCgc+IFUpfsYgz960nYRJKreYkF8/Xfztfm4zkUlaUWXU5tmzlAmiIrkyCo/rz7zMnOlZfQISjTD5nX37S02P1RTlm6tqBlKtO45tQZfvHDfx+nnQtxdpo4R5ICZDXSBptyQ1R5uTrR6+W0NdAkJO/XT3pqMTO0Q36y9bFXS5HCwUrh2Y7FNhm3Mu6GQwudz5VDz0Z10TCZkhPJeSvWzQFryKhN9N3fqsf+U/c6EkZ1cpY2dg2tTQMsWvSAQR3TzYLYsdGeQJFhJ/J2zUF7/oA3Y3WxsDeJPhHTVAE5rOPq2Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=amd.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+AMAKyc+rYDXhXFHcAn2WTtC+UrtvmSO+7ceb7VHPrY=; b=mbudKAUqMzKXnT/rct3tIadH/e9UFKXgaYXF7LLideBzZ3gONOj50FRPBh7/85aWkqh8dfEBX4Vw4C8xs8FJFZO3qdfWRZb7n2Rs87lFSNDmp0e2oFx8IE8AtFiGmHwVdcXMKWiKiKcBnG01vYv4kKxzKNd5EdQYAgbDeJC9VD7SDElziLZNjQZuZs5R/0nVMW5/kvQZ+e6rirjr7VeTP2b/OTzwmG8hs6MfWY1KMZ13ic5lzjkUGw433btes4e0SFIHK552Ybl+P7ulOLlWL2e0jGLYv4cgYeyuXs9d70ooWERPv+xhds4fltRxpSnBjR8kAL9rQ3GitLZiobEFIQ== Received: from CY5PR20CA0028.namprd20.prod.outlook.com (2603:10b6:930:3::7) by DS0PR12MB6606.namprd12.prod.outlook.com (2603:10b6:8:d2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.9; Thu, 1 Feb 2024 02:30:32 +0000 Received: from CY4PEPF0000E9D4.namprd03.prod.outlook.com (2603:10b6:930:3::4) by CY5PR20CA0028.outlook.office365.com (2603:10b6:930:3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23 via Frontend Transport; Thu, 1 Feb 2024 02:30:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000E9D4.mail.protection.outlook.com (10.167.241.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 1 Feb 2024 02:30:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 31 Jan 2024 18:30:19 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 31 Jan 2024 18:30:18 -0800 From: Suanming Mou To: CC: , Subject: [PATCH v4 0/3] ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE Date: Thu, 1 Feb 2024 10:30:00 +0800 Message-ID: <20240201023004.425592-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214031227.363911-1-suanmingm@nvidia.com> References: <20231214031227.363911-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D4:EE_|DS0PR12MB6606:EE_ X-MS-Office365-Filtering-Correlation-Id: d34f7d83-d523-4514-71bd-08dc22cdc303 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LijMgY/yDcfcL/SI2EkwjYbUcp7zQQ+UBYlmGpvlvOQ2HSXdn8CZ3bHKi4HmX4WhJeEDmzh5RERM66vkL8hh7F68u479GDzsI3Xl3rm8QxP29fQ4MjNJvrLbv8Vi04RB7qRtUYdG04Ca7BuyWBkazCd1Ge2OJjbHc4UmR/Dh+VV4ZfNdNYsswZdfq0hQhwN2MMDSsrwr0/9FPbf86dDa8XEIY9Jv918QEP27K6wLlJCXVRr8gpvBuBkaJY8JLJNucPpZa5hibgBVyBPPiLGrkdguIS+GqX/93UI7d9hdiFtuvZQIW0hFbnKCORL+KQBNf92KA2jpdZyGBI9TPurroOA4ozlRTGjY0hSvR04fGDsBevZK7LggP+g2mCh2Zf3V+QMlm8ZziCDN4HYGaJZ2wmGl2MakcrG+ndU29Or2wOpBSNWl4QrlgrEm/R46umvC0wbUMl8iPwezc2BbmkYUOikuApIMhmHZodMiWxFy3KklmAijNOHuXkNnibEV/ooc6nzUlMiJU1mIeCudmjHr7Z120C662dScpK//Xpqbp5AuUn0niaQ9M6fLtu0Z+HnRtwrpymvrJKJR7Kw71Vqp7Ca3ZDjyK/bshtBZL3FYuMf9ouAUHfu3fGdsTmrflKniQ5q//d3TM9nkhMyOWPiOZKn2u1/5xFdF9LOZyEve8S+E6mknMBvxo7JCuHfhSWbTwsa6eTrk2NfBGU44LAP/QIErrTUuykz3VLh/1p+JJ8c= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(346002)(376002)(136003)(230922051799003)(1800799012)(451199024)(82310400011)(64100799003)(186009)(46966006)(36840700001)(40470700004)(16526019)(2616005)(6286002)(336012)(426003)(1076003)(107886003)(55016003)(26005)(40460700003)(40480700001)(41300700001)(36860700001)(316002)(54906003)(36756003)(6916009)(478600001)(7696005)(83380400001)(6666004)(47076005)(356005)(82740400003)(7636003)(5660300002)(2906002)(70206006)(86362001)(70586007)(4326008)(8676002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2024 02:30:31.4253 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d34f7d83-d523-4514-71bd-08dc22cdc303 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6606 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 The new item type is added for the case user wants to match traffic based on packet field compare result with other fields or immediate value. e.g. take advantage the compare item user will be able to accumulate a IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag register, then compare the tag register with IPv4 header total length to understand the packet has payload or not. The supported operations can be as below: - RTE_FLOW_ITEM_COMPARE_EQ (equal) - RTE_FLOW_ITEM_COMPARE_NE (not equal) - RTE_FLOW_ITEM_COMPARE_LT (less than) - RTE_FLOW_ITEM_COMPARE_LE (less than or equal) - RTE_FLOW_ITEM_COMPARE_GT (great than) - RTE_FLOW_ITEM_COMPARE_GE (great than or equal) V4: - rebase on top of the latest version. - move ACTION_MODIFY_PATTERN_SIZE and modify_field_ids rename to first patch. - add comparison flow create sample in testpmd_funcs.rst. V3: - fix code style missing empty line in rte_flow.rst. - fix missing the ABI change release notes. V2: - Since modify field data struct is experiment, rename modify field data directly instead of adding new flow field struct. Suanming Mou (3): ethdev: rename action modify field data structure ethdev: add compare item net/mlx5: add compare item support app/test-pmd/cmdline_flow.c | 416 +++++++++++++++++++- doc/guides/nics/features/default.ini | 1 + doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5.rst | 7 + doc/guides/prog_guide/rte_flow.rst | 9 +- doc/guides/rel_notes/release_24_03.rst | 8 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 ++ drivers/net/mlx5/mlx5_flow.c | 4 +- drivers/net/mlx5/mlx5_flow.h | 11 +- drivers/net/mlx5/mlx5_flow_dv.c | 12 +- drivers/net/mlx5/mlx5_flow_geneve.c | 2 +- drivers/net/mlx5/mlx5_flow_hw.c | 75 +++- lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 328 ++++++++------- 14 files changed, 725 insertions(+), 174 deletions(-) -- 2.34.1