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 A36C343A45; Fri, 2 Feb 2024 01:43:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B8D740268; Fri, 2 Feb 2024 01:43:08 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 141CF40151 for ; Fri, 2 Feb 2024 01:43:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CTWy2AckHyPoWeUXxF5HEwEPt7EWhnswmKhAZ7ZveCG971ntDpfXjoXIjSG0uGz2ivyjsAoAhfk19fNFCmkZ5BXd+96uJX3Nis5uXkJC2SldHcnIqevtasKPA2AHz9Er9PONsLfOzWNswM8IjtriyVOvBnOhNJHbh3wmFTVZ66Y9bWks9onta+pul4gHdPSWhh/dkOWy7ftFDUm7+v8kjBtuc9UeOTquUmpy219lwWOrNMi4XH4MU0N1boMYozXC1k4hotv6m0dovgVv0bX298QZlIzchJD0xM4lHP6MEYnwpW5RGWPz4IRYjYBqa6eFAzUEhCnONw3f05WJwrHkrQ== 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=+R7aCodhiEhD56bfTxP++3C3Da3L2qAqcknnnxN497k=; b=XCrdVYu8R+4k56O0WDSL76J13/NmUsG8R+bsMsV7cYbhnlWyPtnLEsACteu1GHBUzg3t3jEUfUem8E5R2jaC66rmQCamCh0j4riRxA2ob3ZJmqtW5fRuLbbtBbhu/hf2Uw0XOj1Bdtswe9S6ZvHmygbTarD5uwpEV/UCpiBodMVNguil539j4EW1qoNR7Z3qJ+kCOCgv5mfBFg9KVRwuU42zyweABtoiG5tZ8u4/KzSJ9CB0ZNV64z11fiMKOdguQoF23UGit4We/RFh6R0H/Nfplj0klI2eEicQUZrNIM5liI1Buzgy68agpToy2+igiuRYybAmpHS2Sh4VdGtWLQ== 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=+R7aCodhiEhD56bfTxP++3C3Da3L2qAqcknnnxN497k=; b=Bc6hqX30kKJlPhe9zovmI6QSwrN8hp7VBusRRhoygYtj6wvNhQUWyBfqg2NKKTqdypqXes0A32pWGxZx4a2QVsPWfTdAZ8SFqgU6vHe0BszZz9vYMMMTtTjTpkt5tkRMXJxqfAOiTbQpHqFWgtqWL6K51ozkpQsUBW3OJLY6LsGt1HVNI5FK54zKzAEqyVDL7aP2EIU2AKTJT8FJ9sK1m2FBexYVLO05xDDg8ZU6J/nHfo4aWFTyOQp55W8w5HLUVgbBv6lGX3i3BJwb1rFQ9y1OAZHu8icz7j93G6N9hlH70gMJU55z8JnCOtIa+bSK6gd3hzWmamJDyfnMNJ4lMQ== Received: from BN0PR04CA0155.namprd04.prod.outlook.com (2603:10b6:408:eb::10) by DM4PR12MB8497.namprd12.prod.outlook.com (2603:10b6:8:180::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Fri, 2 Feb 2024 00:43:04 +0000 Received: from BN3PEPF0000B074.namprd04.prod.outlook.com (2603:10b6:408:eb:cafe::a7) by BN0PR04CA0155.outlook.office365.com (2603:10b6:408:eb::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.26 via Frontend Transport; Fri, 2 Feb 2024 00:43:04 +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 BN3PEPF0000B074.mail.protection.outlook.com (10.167.243.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 00:43:04 +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; Thu, 1 Feb 2024 16:42:49 -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; Thu, 1 Feb 2024 16:42:48 -0800 From: Suanming Mou To: CC: , Subject: [PATCH v6 0/3] ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE Date: Fri, 2 Feb 2024 08:42:31 +0800 Message-ID: <20240202004234.503097-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: 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: BN3PEPF0000B074:EE_|DM4PR12MB8497:EE_ X-MS-Office365-Filtering-Correlation-Id: be5b6622-bf21-4674-543c-08dc2387ea8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +CxnDa8gVlX7qyZoYAz+P9+U/xTMPt5Bih/qfyZAI8ysD4NwEg+TaDykEr8v7CsPYxUJfzbM00Np6maEeA27YsPEpRxn9rEVnVz+y4HMa9my5PW5WX8v19REkYo/lYc7zA3RM29nz1Xe0s4X6MY0ERjXvYG+XW/qnTc+8mzUj5yGO7a22UNymWct1XfxhiPu9tLmjkKbTAkxfNSCKNcNEENq0lYKQ478BvHFUxaRWUv3fggyD8PESDXrb2i97L1HYMfEmchxTZAu5UCotLeEFv4+6XBomUddGbjCFgonEXPVEfNKV9oy5KZwzm8xQORcDzRgQKhWA5BgVgzQ4QyR1Z6EgalYr1N4e75h6K/2DtJaaWhae8X3Ck6LdPxtICC17v3uIVE4UHuBVD9iy/zJ9BwSV1GPLKuXbZ8Wq9G7iXSaHimjXVRei3aqBJaEth75SJsQvk+BNdVeeSPa3F1cvGgIehHT/QavhMuX5YjwE1W1rTPCpD5J43or6cfTljqouexWzLPN9B/7ejc6RQA6k8mwjz0Q6KcelTJCyzERpLOVD6fImJid0AMSbQeDeW58T4azcw2LfpB+7C0p4/4eiU9EmvHAVh0kKmVhPkJr5JZbiGGn2tXe+ePml82yVOxTGTbMliF3iIMmVWqF8oLSIMWpZJI5wpFteGIuyFMHq5ADRuM2Mn5gIOAC7PWJrYqGpump/t9tlqj8QOhu51HVsHUlKp5aCEnry/nShG0hj8I= 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)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(64100799003)(1800799012)(186009)(82310400011)(451199024)(36840700001)(40470700004)(46966006)(8676002)(54906003)(70206006)(70586007)(47076005)(6916009)(478600001)(316002)(6666004)(4326008)(8936002)(7696005)(1076003)(2616005)(6286002)(336012)(83380400001)(2906002)(426003)(82740400003)(107886003)(36860700001)(5660300002)(16526019)(26005)(55016003)(356005)(7636003)(40460700003)(41300700001)(40480700001)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 00:43:04.0227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be5b6622-bf21-4674-543c-08dc2387ea8a 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: BN3PEPF0000B074.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8497 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) 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 (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 | 9 + 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 | 332 +++++++++------- 13 files changed, 727 insertions(+), 169 deletions(-) -- 2.34.1