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 5BA3E43A94; Tue, 6 Feb 2024 03:06:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3491D402C9; Tue, 6 Feb 2024 03:06:57 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2084.outbound.protection.outlook.com [40.107.92.84]) by mails.dpdk.org (Postfix) with ESMTP id 3D9304003C for ; Tue, 6 Feb 2024 03:06:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A15L3hbCz5hefdgz3UGiXiPk/yVvd0nPhZTsHEV7nj3DlaBSBr0lox7KPL1CJlr4VUoVSNt+hJwlt56RBpsnjo4qsLVH7lfa11chk0nIkY5xRBxe0Cv4l4rAR8ITMafIBzYYNcNiZqF80dT0lifdvdZ0il3OQrtMecXkf8N+Heh+7dJuCJs/u1hhYRnB8PoY3iH2+oyJuaPv3eORhmQozSy2Hvjs/HbsMAeKE9n4x3OiT8nPIVYCLMA3rN02urkrUDbd6wqBxj7csFtOXIIPFtpusZSDG5J5yX6xWqC06V9QNrBCvmQXN0fqGGQ6CYkeJEGckDIG9k0houi6ME+tMg== 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=WoBXqZPM69fgewauuLue+flOmcKgZsE8PsTkp3cTBLA=; b=XFRaNF0JoPkKAQfVloSwXQVb/x2jS3FZWOwwJXBfTAVOQIP7kyAjKGOD5EZCe1X1XidSpRqxw9GQvknqGGx3fQVYnSHgsuYGcwNrVf4VtxwvUEr6hAIaF17UzM4iZVplrAY3dxxU1cq298yGc52a2jVbouppM6UOXMH5HpTDaqqE5Dq/qIRTVYy+gajUrff9cCzZUpO7obXsYZbLv2Ztz72wlivHnb8dpUbUcpBTtHlhmhe9LKK9PldDVwtMgMIFLy800rq0E59g4uPobI+PvUYA9AKdOSORb+GRExr6LgIGKP4v06lcb9xAdGnE3ePEWjEjL/6sAB1Ir3SoAwaczQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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=WoBXqZPM69fgewauuLue+flOmcKgZsE8PsTkp3cTBLA=; b=QYi7KwWgUWQ7+WUZvwMdj95OUMQJTq/sMnV42yznxtkMTFxLJXvZlmzwR6Hh1gAgFktwcETWF0whG6LXNhCSrRz6qti2EhdvuTr8T4PPHugREFdgyeyk6kVdL2gpZdJhmAK4MU/N4TZkcoAjH6EvTwN64D2UfLYzh4nbmwFPmSDGRExwIKqpHBOiF/qfpIHwiWobQvL0a6YAVFAmSzOfGX93CsXo2DXXwgQqm8wocckfFR2wVhTAVr+sSvVwVbOR8YZaM13vMRCvcQPcp6fef3GgVliJBDeZNNAWrR2+iLhXhLiC5zsX193TNzxQxig/M7ACiMiaZNNrXFxy8wcu1Q== Received: from BYAPR08CA0036.namprd08.prod.outlook.com (2603:10b6:a03:100::49) by DS0PR12MB8444.namprd12.prod.outlook.com (2603:10b6:8:128::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.13; Tue, 6 Feb 2024 02:06:52 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a03:100:cafe::5d) by BYAPR08CA0036.outlook.office365.com (2603:10b6:a03:100::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Tue, 6 Feb 2024 02:06:52 +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 SJ1PEPF00001CE9.mail.protection.outlook.com (10.167.242.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.16 via Frontend Transport; Tue, 6 Feb 2024 02:06:51 +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; Mon, 5 Feb 2024 18:06:43 -0800 Received: from nvidia.com (10.126.230.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.1258.12; Mon, 5 Feb 2024 18:06:41 -0800 From: Suanming Mou To: , CC: , Subject: [PATCH v7 0/4] ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE Date: Tue, 6 Feb 2024 10:06:21 +0800 Message-ID: <20240206020626.545946-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.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE9:EE_|DS0PR12MB8444:EE_ X-MS-Office365-Filtering-Correlation-Id: 246ce651-51da-4a7a-f552-08dc26b84908 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: htlKZhhrosfzKv2ZxY2J3gt+Ovcst6tbDiSFbP9OwCDtPfgT/ZXF/cWRx94JCabX5Lzou/tBthxMksroHKAosMVpL8BSSyMMhfP12rNBWDA6f7na3u3pFt/m87h+iWhRtsKFz1Qg1zUWaEa/G1MxB/LaiyJSLUeVXEYNX0ntrjO9acgbHhzi3oBpoq0VQNJMx6PQO4swb+CQOlx7JqHvkSUhVsHPHBeZJHjInClb+PS/zFI6nynm0WpfNPWueYtwOLNL/Z/ZYXFWW0KK784k17LTWJSfcG9r+Xcetz3MQdr0sOmjtNURVN2VT1/S05qVvDtlTBVruyrbXCNUzp1UCHWOcqqESfLy+MtVgxOeLx6quVFt5YXXiesw9YYeiB0rUruRhDHSFNS1L1g7HeNcoxEvAwkhffGgJhxMv8QDosRi14vh4opp1afKlECcmz+6ddMNkxrR0WRkI17xbylrJxqBUOiu5I2ykVnkRL1SAWlmq6rretjz+r6XnpSd4Kc91pCFWRfLF7ZABZZeeT0qUiIPXKI94GvstA1YibydXrON/zbbrzCLffnzYI8Ua6G4iC9XZ0Iizugcjfemhm+47qjBwP5hmmsMoLkyDc6X+ICv+pL2u0AJijPmxUWcRfWY2ZEEVdUg7BGHu+IiZTDzng2KlgpYhGP4sUQac2UKRPVcGlmWipDvhgG732WGBRwe0v+esZwuE48bDfhhzXDZOHuZ+UeDOJTsXNVMoMvM8/Q= 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)(136003)(396003)(346002)(376002)(230922051799003)(1800799012)(186009)(451199024)(82310400011)(64100799003)(46966006)(36840700001)(40470700004)(55016003)(40480700001)(40460700003)(2906002)(478600001)(5660300002)(356005)(83380400001)(6666004)(86362001)(54906003)(426003)(8676002)(107886003)(110136005)(2616005)(70206006)(4326008)(47076005)(36756003)(8936002)(7696005)(316002)(70586007)(41300700001)(16526019)(6286002)(36860700001)(1076003)(7636003)(82740400003)(26005)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:06:51.9679 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 246ce651-51da-4a7a-f552-08dc26b84908 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: SJ1PEPF00001CE9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8444 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) V7: - Moved release notes to API. - Optimize comment descriptions. V6: - fix typo and style issue. - adjust flow_field description. V5: - rebase on top of next-net - add sample detail for rte_flow_field. 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 (4): ethdev: rename action modify field data structure ethdev: move flow field data structures 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 | 10 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 ++ 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 | 330 +++++++++------- 13 files changed, 726 insertions(+), 169 deletions(-) -- 2.34.1