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 71013A034E; Sun, 6 Feb 2022 04:25:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F34B64069D; Sun, 6 Feb 2022 04:25:53 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by mails.dpdk.org (Postfix) with ESMTP id 430FE40042 for ; Sun, 6 Feb 2022 04:25:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nm2qarGTlAglXhsasVp1+QVg+VZLJ26k0ysk7dCjV+2sMiM6BPMEEIdaaiOZk1IR6e9066+eo7/b4ByShdQruifREqdceB3iSz9qHofFZEC603pbl0tA1mI31LnG3p9gHiwq9T0Gih3OawfBf6+gy0YRogUZW+C0jGH7+Vr3NeKLC4lXA0rs27jWziIpJFXcRksWdumsea7x5hfBjAyPFG2pLm0/y9ERDvczB0I9pT1DGA8h6zXGRm5qKsO+fC4HoRcJjdrZftIk3IhwOE/ZvCtByyr0B6fBeo/iSyc9xDJlshwCX+q6BNvpqwqGSdHg23mO4QHdYeyJ5HNvSzS1Sw== 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=bkqUKaXVpk8NLFud2KZYSx6o1IULJRnhOOY4MvhBHJc=; b=XuBkXeDp7ROgO5kjn4agWcztcgjP1QbqzhLS5Sj7Mwq8SObRlIBHE00kkSWmnn52euMEbVI9L3vVVAs1kLV4UB2zkug+DgxaNJOZtMENW76FGYeFWXEC//iryxVFXb4kPstydTHImr5BhhB8KwwhWlMVeUAwSlPviqIJbOH9TVQxHBLp3B0/u/jAPdGjLS/wgRB/23QeUpkU4bE4E/0TveqXzQNbUECEZKvV5FIUiUSNEYlvsackNvbrXBMLTF8OzAnfc5unaZhigtuIAPMS801sDLIkXAgIIZDOr9g1FkngaGSQRMPSH9aRBV7cAOS4LbEArzYbS1/Xg8lS++9L5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.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 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=bkqUKaXVpk8NLFud2KZYSx6o1IULJRnhOOY4MvhBHJc=; b=XJKDVfZCR2bsR+VjPCtu7+6d3h0B7/9n0W9jGQpgtj1ZpUsJwqhD4T9f3/88FIQHirG+hOR1RDnCmZeurBkFNCI6PD1B0we9JiPDJl7TyDGsiuN/0r19SdWM/wGHsNmWukKfX0lvE3ZSos2Oyo7RDCRERAcDdqcWSD9yu0BxoFiHq7TYoTrk+kyBwCYVIhpljhJr+LjcNe5LPZtptKr6HHq6AZ437G5/4wP9IVwaSFOKxjv1di+lLYZZ2tgUuFpSG9ue7KASsKbde3X1H2PmAeqiW99E/1L4KZELO5sORiflsBAEoXBrRwe38yXHL7o4arRZowmDukcIqwwHMufSzw== Received: from MN2PR12MB3485.namprd12.prod.outlook.com (2603:10b6:208:c9::22) by MWHPR1201MB0270.namprd12.prod.outlook.com (2603:10b6:301:4f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Sun, 6 Feb 2022 03:25:47 +0000 Received: from DM3PR12CA0132.namprd12.prod.outlook.com (2603:10b6:0:51::28) by MN2PR12MB3485.namprd12.prod.outlook.com (2603:10b6:208:c9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Sun, 6 Feb 2022 03:25:45 +0000 Received: from DM6NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:0:51:cafe::ff) by DM3PR12CA0132.outlook.office365.com (2603:10b6:0:51::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Sun, 6 Feb 2022 03:25:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT047.mail.protection.outlook.com (10.13.172.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Sun, 6 Feb 2022 03:25:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 6 Feb 2022 03:25:44 +0000 Received: from pegasus01.mtr.labs.mlnx (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.9; Sat, 5 Feb 2022 19:25:41 -0800 From: Alexander Kozyrev To: CC: , , , , , , , , Subject: [PATCH v3 00/10] ethdev: datapath-focused flow rules management Date: Sun, 6 Feb 2022 05:25:16 +0200 Message-ID: <20220206032526.816079-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20220118153027.3947448-1-akozyrev@nvidia.com> References: <20220118153027.3947448-1-akozyrev@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 924d756f-e3ce-4718-d31c-08d9e9205cc3 X-MS-TrafficTypeDiagnostic: MN2PR12MB3485:EE_|MWHPR1201MB0270:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1CLaVrsPejtEkkxqO3l8e8sniN3kZskCqvL20b8jBOXyR4wtyjhkYHHKifYPy/My3gYgnlsHWIwSxdWK1b6bjhVjnNiJ4yzpt8hU9spTIO+3zNdy13xYbarGCMV6DdnUdXV24WRL72QVe3pSa1YhsE9CZgmxOqLkAS1bChCofo/bmw6olO9x12yhpGkY0kMVLy9auhBefM3rBgis3crgvtiTUowVAY7BAFiyfusoVLf5/v8xTORYs6GMedoa/Ee6Sf0XMd0BCCYtvyR9uJHXVuRluNb9mcDpC+xmyXOLjqmNUJY8/KnPUu33FJGFm0pfAtIui2osi96yyBXMpPYelHZ1xu/w/yMUZ6E91Mfj2EgOVnNfI06+oaQzOMjSInhcMAyMfjtLNSGwT4b9HhdMMKjYZV0EhxypZ3EWSigEzSUEJHho94IRc9lU4jSbXhh+ePxZswZgygTT1I28eB9I8AKwcn6SsrpFzC+l3Av/D3y5jtj/Zhr8tt5p6PMXIGFdyB4jNeoIKWzIBSHPzMFwY97UXY2j1MoQ4n2O5MnTCPGQ6w9J2Jx1qfzprqJ1MRJvRHFegr90UNvKRdkok5lTpoxUlUjcBFqhIJDWPlzEkdIk8cKYaqPsT5hg3rejSZZyiMcDHdE9thLgm6qYaeylnG/vxit1Gn294vK2N2yyYFMsWqvE8HBpcYx8BDknjdEtRZK21FKjQZd/8aA+L97vNajmXD/u60wnGn/RfGmQIKGBZfAj2Opohsvs525w+17ebQEGXaYgNmT/Nsexix9xL93kaswlZqz/UeswSl17mxs= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(83380400001)(5660300002)(2906002)(6666004)(47076005)(36756003)(70206006)(966005)(36860700001)(508600001)(26005)(356005)(16526019)(186003)(1076003)(81166007)(426003)(336012)(82310400004)(6916009)(316002)(40460700003)(86362001)(2616005)(54906003)(8676002)(4326008)(8936002)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2022 03:25:45.2948 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 924d756f-e3ce-4718-d31c-08d9e9205cc3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0270 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 Three major changes to a generic RTE Flow API were implemented in order to speed up flow rule insertion/destruction and adapt the API to the needs of a datapath-focused flow rules management applications: 1. Pre-configuration hints. Application may give us some hints on what type of resources are needed. Introduce the configuration routine to prepare all the needed resources inside a PMD/HW before any flow rules are created at the init stage. 2. Flow grouping using templates. Use the knowledge about which flow rules are to be used in an application and prepare item and action templates for them in advance. Group flow rules with common patterns and actions together for better resource management. 3. Queue-based flow management. Perform flow rule insertion/destruction asynchronously to spare the datapath from blocking on RTE Flow API and allow it to continue with packet processing. Enqueue flow rules operations and poll for the results later. testpmd examples are part of the patch series. PMD changes will follow. RFC: https://patchwork.dpdk.org/project/dpdk/cover/20211006044835.3936226-1-akozyrev@nvidia.com/ Signed-off-by: Alexander Kozyrev --- v3: addressed review comments and updated documentation - added API to get info about pre-configurable resources - renamed rte_flow_item_template to rte_flow_pattern_template - renamed drain operation attribute to postpone - renamed rte_flow_q_drain to rte_flow_q_push - renamed rte_flow_q_dequeue to rte_flow_q_pull v2: fixed patch series thread Alexander Kozyrev (10): ethdev: introduce flow pre-configuration hints ethdev: add flow item/action templates ethdev: bring in async queue-based flow rules operations app/testpmd: implement rte flow configuration app/testpmd: implement rte flow template management app/testpmd: implement rte flow table management app/testpmd: implement rte flow queue flow operations app/testpmd: implement rte flow push operations app/testpmd: implement rte flow pull operations app/testpmd: implement rte flow queue indirect actions app/test-pmd/cmdline_flow.c | 1495 ++++++++++++++++- app/test-pmd/config.c | 770 +++++++++ app/test-pmd/testpmd.h | 66 + doc/guides/prog_guide/img/rte_flow_q_init.svg | 71 + .../prog_guide/img/rte_flow_q_usage.svg | 60 + doc/guides/prog_guide/rte_flow.rst | 318 ++++ doc/guides/rel_notes/release_22_03.rst | 20 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 375 ++++- lib/ethdev/rte_flow.c | 352 ++++ lib/ethdev/rte_flow.h | 698 ++++++++ lib/ethdev/rte_flow_driver.h | 102 ++ lib/ethdev/version.map | 17 + 12 files changed, 4324 insertions(+), 20 deletions(-) create mode 100644 doc/guides/prog_guide/img/rte_flow_q_init.svg create mode 100644 doc/guides/prog_guide/img/rte_flow_q_usage.svg -- 2.18.2