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 3D7894373B; Tue, 19 Dec 2023 02:34:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7632402D0; Tue, 19 Dec 2023 02:34:24 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2051.outbound.protection.outlook.com [40.107.220.51]) by mails.dpdk.org (Postfix) with ESMTP id 733AA402B1 for ; Tue, 19 Dec 2023 02:34:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQim8AfJzjyzZb4zUG8WVOjFs6avhaUaVEQbagBeNVMMh+h2QWXjiPYu5Mk4YuLUafB1VRPw87zA3YTYGdwJ0no22Ni7gS0mfwCY6XnKJ2KlOqmFtzt8RIf9RfZGdsS4cRG7lKrGpiJGLriTfl5EfMY+MT1gZ4+UhKECJPUkyIwtWDQuqCTT5hnZWBQeo+oDjKl9n7qQ3n4Iyd97WRJgJzFca4Y9P2wo4jpyWg83kBFGyXM+hm4Nz4Jemwelwst/eqMORBmoh1Bsnh8LXs8+h08FllEoJj9AQkk8KD8BfrJUXqA0jZJjpfUYZKLxrT/KvG9UM+kRPUCfGe26YURzVA== 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=4SXzNOh7F8H/pCxRf9Upep0XzrQ+obKeIC8VobNPb0s=; b=mdH6ihzZCAdH9nEcMsUKqO92XLBmxCwnIbHaXTJ5seaubFYb1IkaZPoYulwQOzO0Ra2NYryn9acomejhnBPzE3Cw4nB/B/tIMA3iSOXnS4VJ8MDg+EnOa1zNoAEYmWUkC9RgAa1IjTbuSkgf7x9JDK+F7qwrWLecQDjidEn9ysP7LNlRbMHJaBdcB9HOSTVTe56uPKKyyPbWiZ8B1VFesN/knGJcnArXrl92qClUzXmCeE3ZWTjNRl194mZXuHv49bfIS+fb9QkXIBay5kFNE4Yd9dF6FMaITbcTLR9o6Ma8xzKFTHerBR7aRk60dH7sumNT0YZL4nM115E1EvddKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org 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=4SXzNOh7F8H/pCxRf9Upep0XzrQ+obKeIC8VobNPb0s=; b=CKwdPQsuXyY4ZQCn3BCY6ftJnvxsJmoaZ87ycE3TfTs2yMBWl+Apyii0fDMUzwBgSJ5JIW4vyENYR+PehiJYiXWsvezpAsOep48+4Z5ttFPPhMmC+0sO/01RNu4HNt9GRQC03GKz4hi8tExUNRJIcdcV2J98LCgBUdo6r4y+hZdRNU9asJpk1tQ/5HGstEwqjFA4NSd5ZYfHa8oinIKxYsnrDLLuw6pmqYy8rgisyj00uVth09ZOvKpOksHXZi+bOPDeHy+E+kA2yUpxX1SjJXaSkO5ie2zXFtAwHtJ2kYiQ9snfvgcHemuOGKdFk80tpq5+KAzXyWlJtDzg/p9Qgw== Received: from SN6PR05CA0009.namprd05.prod.outlook.com (2603:10b6:805:de::22) by PH7PR12MB6811.namprd12.prod.outlook.com (2603:10b6:510:1b5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 01:34:18 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10b6:805:de:cafe::27) by SN6PR05CA0009.outlook.office365.com (2603:10b6:805:de::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.17 via Frontend Transport; Tue, 19 Dec 2023 01:34:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 01:34:18 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 18 Dec 2023 17:34:04 -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; Mon, 18 Dec 2023 17:34:02 -0800 From: Suanming Mou To: CC: , Subject: [PATCH v2 0/3] [PATCH 0/2] ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE Date: Tue, 19 Dec 2023 09:33:34 +0800 Message-ID: <20231219013337.531548-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: SA2PEPF000015CC:EE_|PH7PR12MB6811:EE_ X-MS-Office365-Filtering-Correlation-Id: 10dd7c8f-72cc-4a86-ff0a-08dc00329e65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aIvNRDmbD1ggKgkSOF2GFeAYPjG3QmB4eVRXhcCc4R80rTTQNCEF8ZOBn14n/qMzaACoDyYbyS0A0k70uyenYQBhMgcMSDBXyHOluFViYiXTiEvS59Ed6cDGbvlGI3mjhf/jQCdRg3EwcVHITsnUX+PPC3LNVeNEvbf0eEgZPgrYi9fEWhjMqKOg/Qlj21yOZ5w2AsH/8SurG7YgzJxrLEtbr8SponoNmovrehCr1t8gzfkb4kLaD5glw0gv0PZ/M4K+9JA8WatH8rhMAh+7R7i1A5Z7DEpHCyaEOPyBWMVWGouQRc83KS7StDgzhHalhl0SKEkPhZoR4bQc4xI+AR3IJ3+B3ekCWQDmlhThKFocvRpW8xwUleUuqKeITPniaShzdoZvf4zp9bcbI5vSVGy+GnwBxoFbhTH7Il4f3Qh/fLRjt0lCxjHnqN7qz4x6JcGTeFBC8HsQpiJdoXiXJa3ZXp/nqdi76EFumDTP/AHShOL66mB8oHwEORliHvUfTDsBRtkXsw0NbhMqXWzODOym02ubWI26fUkK7XjbRCQWcyqM5LF+bm0T8gZ/h4JgFA1sytMXNCMHZNr/mmm8I0g2tnRmgTTWR6xmWfMx6IN2T/mJMyyW06iFCPwT1CuNG2tanRVdBjURv8IrZSEUVs5fmxfpQ6Z99jdFeppEuiYbWSl2yP9TT5TsMlvvXThfam+tPkPBSI+/vce6x+G0rdix66DVqq3IDP6bexTjn3a3hLoJHpg9/67wIjB19W/q X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(376002)(396003)(39860400002)(230922051799003)(186009)(109986022)(451199024)(64100799003)(1800799012)(82310400011)(46966006)(40470700004)(36840700001)(82740400003)(356005)(2906002)(7636003)(40460700003)(36756003)(41300700001)(86362001)(70586007)(70206006)(316002)(54906003)(426003)(336012)(83380400001)(6666004)(40480700001)(2616005)(107886003)(1076003)(478600001)(55016003)(6286002)(16526019)(26005)(36860700001)(5660300002)(8676002)(4326008)(47076005)(8936002)(7696005)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 01:34:18.4367 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10dd7c8f-72cc-4a86-ff0a-08dc00329e65 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6811 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) 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 | 7 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 + drivers/net/mlx5/mlx5_flow.c | 4 +- drivers/net/mlx5/mlx5_flow.h | 9 +- drivers/net/mlx5/mlx5_flow_dv.c | 10 +- drivers/net/mlx5/mlx5_flow_hw.c | 73 ++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 326 ++++++++------- 13 files changed, 701 insertions(+), 169 deletions(-) -- 2.34.1