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 3990B436E9; Thu, 14 Dec 2023 04:13:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC8C142F7D; Thu, 14 Dec 2023 04:13:02 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2081.outbound.protection.outlook.com [40.107.94.81]) by mails.dpdk.org (Postfix) with ESMTP id D730542F57 for ; Thu, 14 Dec 2023 04:13:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKkIlnDWrOCrMboLTE8o0NYjPBGnUU07wvg4I4MQIiQU+OHou3UMBKmcU2GmLW4a9cnNfPPqEaKer8P6N8a1cnPvhhP40u+nAPVAEEumPTIPx/N0cw0bKw3aoIZcgIIneBl/1EhR+8j1joeYwsCsDaPjsxt/eZQRDlJZ0AEqfuvpRCRMS7At9ma5RKHq4yGYSLGagE2JfT7sbkifVXjVR5tHSwPv/VzH+mYPWVFfMyJAQvWZC0TteiSyahfpuH7Pveznyzc6A4PwPrF1fMO+NseVYeT5Z0/fXUJwpaQxR0nP9ezrVxuUevazZcQBma212tvJltduB1BQufOhbL9QrA== 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=rnRvMvnawG62oSJhU2mgRMddRAU+TO1cZ/fD7hYuPhM=; b=AhFitRhg8fhAK/Lzs+BGVnjPKW3nENsd9TqdcGVN0Dy8F5RINgltffAoJ7ecsNgNJxI/nnvKOVMNe2dn6AflF5bhNAgZGX+DCXexzgszot2UEovwgPpfDZcKnbImZupj3tFPta8/AhEcM4VekCV8cY5A+2HhTHLNuVyMPzo30DHgUlDiws+ntrWjUQBT45lAa8vm3CmPo/PiMshUoRkqbwD0IxPBnMSXYn78JHsXwKlmTM4+8t4mMm9heqkRSWSCbjMZ7yV/YnpdcLnNO/Hys9sn2nK2VP0p2D5WUP+WH3oYoVRS6lnd0e2qkrQ7lMc/bV4BAWYR/cF3zHG3kHiJfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=rnRvMvnawG62oSJhU2mgRMddRAU+TO1cZ/fD7hYuPhM=; b=B3CY5gKEjl0oaxY7U/t+uORV0et6lOyXeP7A8cjcKkn7CAX6fyX5OXylasGG0k6x28V0LKO8uPiXJcxRh8Q88dKG1ZQtwK161w5Ep/N70xixn8er4+Gsh8KJAtUbezkcbIJx6ZJ9aP9g3ZlmD8OvubXxyhMAwBYKFQVUZ4Tsu9wdX01Pun0Pm4fixhJcrGo6p0LyCrpeE5DPYgIMHMrfP3bzjQVOzTvE9iUldxquo2hDb2HLob/lGuyiLmR2s/O7D562IqWerMx4J315p/2wcUQhY5vhCpUGdGEB39msAU+JNpFDGvRpwmEt5E00lyyVEO3+vs4TLI7Ksw/4yPwIWQ== Received: from BL1PR13CA0264.namprd13.prod.outlook.com (2603:10b6:208:2ba::29) by CY5PR12MB6252.namprd12.prod.outlook.com (2603:10b6:930:20::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.38; Thu, 14 Dec 2023 03:12:58 +0000 Received: from BL6PEPF0001AB55.namprd02.prod.outlook.com (2603:10b6:208:2ba:cafe::4b) by BL1PR13CA0264.outlook.office365.com (2603:10b6:208:2ba::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.8 via Frontend Transport; Thu, 14 Dec 2023 03:12:57 +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 BL6PEPF0001AB55.mail.protection.outlook.com (10.167.241.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Thu, 14 Dec 2023 03:12:57 +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, 13 Dec 2023 19:12:45 -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, 13 Dec 2023 19:12:43 -0800 From: Suanming Mou To: CC: , Subject: [PATCH 0/2] ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE Date: Thu, 14 Dec 2023 11:12:25 +0800 Message-ID: <20231214031227.363911-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 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: BL6PEPF0001AB55:EE_|CY5PR12MB6252:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c79e509-edf2-4f9e-50a4-08dbfc52926c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WYCY7bkcr2d8UrDNL5ftIc/fcvR0+DWWrQdlWlukXlse/qz7d1+HCUBi1lJcu1gfDniJYvrDN+r0GMNdAJNteSa7RYvZSG+ffiSzKFvpUeGlXGNDPjbVQrU1y2QQ/fZnoeVF9H7D7I7AtOoTZVqOkRvs9DhSFyVL46vioPmU0bM76j7Y2uZMMONQjWpd0X7X+NSJyQGHAdRTLncwwYMgDaLY9MQmwPAgHHH1804NR7qk2d1Sn/XquDnK9QjV9DWbKkMyoPcm4KL1FZNXiM6DIgUQhK9Z1wmcLPUksc2uTiewS1ZnGJvfmVsBvriXd9OxfMoXL17ealX4i1ZHETQtlnPWC6gh6JnIspSfShXUqqnYoiDu9YEu4wXCE0n/6jUtF5FiLnEfGhGH9sSLxVp2oSAv9rsjw816fyxLfpGa0pWZoXnn0M8+i3uKx3wh76Yp6Ww/ORw9nJZEWXP9IvTEXDlTW3FFkyno1NoCOsqsq6MtRkGQGgwo0xux0hwzzamLVlkXrPa2ZM8w0jM0aiYJaBBX7zcA0tZpRuG9xZcr0kWDK9rA2NQ1rUnXQKzT7bOVdF+tqgHlV6Pfm/lE36ROtloMsLLBMJpATzH6RSnRXid55KgVkD/w3J7IJHUkE7NPDVbreTTseRL0TmLVhsYQBSoQQyApdP30kJ3BjG3lIJnu7vWSSjCiJLiHMJlKsvdnKPYhSk+Z9EVRr+F0AMfxCCPBBjhzRH4Ovg1zsKIZlq0= 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)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(186009)(64100799003)(451199024)(82310400011)(1800799012)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(426003)(2616005)(107886003)(16526019)(1076003)(26005)(336012)(6286002)(7636003)(47076005)(36860700001)(6862004)(8676002)(8936002)(4326008)(37006003)(316002)(2906002)(5660300002)(478600001)(41300700001)(6666004)(7696005)(6636002)(54906003)(70206006)(70586007)(82740400003)(356005)(36756003)(86362001)(55016003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 03:12:57.5115 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c79e509-edf2-4f9e-50a4-08dbfc52926c 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: BL6PEPF0001AB55.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6252 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) As the two struct ``rte_flow_action_modify_data`` and ``rte_flow_field_data`` share the same information, the struct ``rte_flow_action_modify_data`` will be converge to the name more generic struct ``rte_flow_field_data`` in next release as well. Suanming Mou (2): ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE 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 | 7 + doc/guides/rel_notes/release_24_03.rst | 7 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 + drivers/net/mlx5/mlx5_flow.h | 3 + drivers/net/mlx5/mlx5_flow_hw.c | 73 ++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 230 ++++++++--- 11 files changed, 690 insertions(+), 62 deletions(-) -- 2.34.1