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 996C0A00BE; Fri, 11 Feb 2022 03:27:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EF61410E5; Fri, 11 Feb 2022 03:27:23 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2055.outbound.protection.outlook.com [40.107.237.55]) by mails.dpdk.org (Postfix) with ESMTP id 9928940DF5 for ; Fri, 11 Feb 2022 03:27:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jr+l8hP1tspXwPhBMdjPRs0ypAM3wAZyCxX4tgDo9a4a9plTTakaY7B+Cz3MHBE7L/U3hwR3JCUTp7hKsMIsRwnAlpyrs2qJaNotFzS5ThFnEhOb1GPT6Ot7Tv3vJfryiC99UhQgq/VYotT7zDnznlS+03SpncN1pOPCmRQ5lkVqrkMkehagTob0StY+y4I/DKBL91TocPoTqQYXY7JoRIYdOqNJPw3pac4OnVd6qncHghjuvdx5MKDPr3ucwctuWo90cvLkEKprc+ci8MtseMT2tzJvEM66o5a16EYENiMOFfZjkSHKpTbAqTgp0B9fiGV+vKFAgDr65wHsSJE92w== 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=QznW4/JvPv7jwufv3VQfafWt0FtE+lALLefq5OVmdKs=; b=bKnqQqbKtAynXnLx0iQsv80MFJKx7te38r3fIIGNB0TeowIrFX5tw5PtyySvWpRpB+Lsnpz7R8qNwswgMJ9dbwL76WCqVx57WOSfpiuYUUCsiQedQwKlS891ka+goB+bB766X1d+7LuncN1yHjq8MfQDjm9o7zS1cEQRN85S/SN0z6LrJaErj/tQjiO950mUnwHQawgHv4wLCfENxd1/eM3Cv3pSKMz3Au6rfckC8RVPvCIG0Y0Yv12wyrGvwaZ+5RufwgtPuLv5cRspWY4ghUwIoMAbyqHKc38atSiXfkg9kCSEv71uSfA1uX6LbnyMsxwln5/ZV9amogbPet3bIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=QznW4/JvPv7jwufv3VQfafWt0FtE+lALLefq5OVmdKs=; b=hBvI3t6C9kqGiyjR2kEDlNZx6PuKlpc6sB9GITMgdaAF07ytvsqrRyJaKKsd6Qm7qeNcQrQNYVAbnRZKShM3ewgtRNY5fNIvMfpuAuHrx35WhWEszpGx0tMpaEG1/bGnp60KFdsTEonfGZvQndAxR9m+2Z1dNHYHrk4hJyUcfunA28kYdnbB6WUgr0NT7If41jzgMLnmfwFjDwqSsj723ku/3tOej8ebVUWrIM1Oo54uPm360zVB3HneoK/boBogKd38cySyp+p59mLd/PkWiLu8af3y3NUomYH+phZ3bBwy5UtrM33Y7EwCre1dtBfVtTenIfjq9Itb7PRRAIOUcQ== Received: from CY4PR1201MB2502.namprd12.prod.outlook.com (2603:10b6:903:da::21) by BL0PR12MB4692.namprd12.prod.outlook.com (2603:10b6:208:82::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 02:27:18 +0000 Received: from DM6PR06CA0079.namprd06.prod.outlook.com (2603:10b6:5:336::12) by CY4PR1201MB2502.namprd12.prod.outlook.com (2603:10b6:903:da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 02:27:17 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:336:cafe::d2) by DM6PR06CA0079.outlook.office365.com (2603:10b6:5:336::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.13 via Frontend Transport; Fri, 11 Feb 2022 02:27:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Fri, 11 Feb 2022 02:27:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 11 Feb 2022 02:27:16 +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; Thu, 10 Feb 2022 18:27:12 -0800 From: Alexander Kozyrev To: CC: , , , , , , , , , Subject: [PATCH v5 00/10] ethdev: datapath-focused flow rules management Date: Fri, 11 Feb 2022 04:26:43 +0200 Message-ID: <20220211022653.1372318-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20220209213809.1208269-1-akozyrev@nvidia.com> References: <20220209213809.1208269-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: a1d4972c-9731-416b-884b-08d9ed0605c7 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2502:EE_|BL0PR12MB4692:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L6W9PE0UZTgAnpNtVUSU6UTNGEQKVLAr/EBw3OuPbyRouP194SnqovtI5nupdRTBzSVz33+dITw99lr5vGw9u7ZwFQ1CVNSrFZGV0tB+As7tVzTTQRGl7GpLux7n1BO+G2EF0u0GjSMRlsjyrz4TZhiYyr8W+3qWf4wchumgch9KDhmh5U1OHJr65gPF5m1/cgbWWfC0i3N4RqfEQ6D0O4uOfJqwmm0ELVyDQGJtxCxqiahjLmkinS4gKxpyc117dC+eSviJgvtnKKyym55hBpXatBFiXjD1PwrCuAs0PHgZ5Z9k3NO1JZYd44rdoyf+6LXU8giidUmjzc/qrdiKT0Jl3wxW5awrnqCQmBDXadB/0GIROjhB177dJsnPhgs74cPFgBTXeW1pp89177TkcrC5vcZIaKifPZqUj+o86NqWBXkRTB9K4+FISn5KuJ+dOj5sny6Ps4joXDuw4N4ajipxtwB3FoWPbTnjlbNQhvl0PbZH7e/eMolfUoLkU33Q2sdUlF0zNWL/bzU5yswzcEgMAwZLf/ernxzPEVyi3yosDW4NwdLwyEr9B/W1o/zr4kLXb7yhmMpSIJcXHHF1CjFuUEeSgkeYOyQyBQ2GepjumbGP7f57xZNpc6UytYBm4u6NUEI8VkXliG2WDlOGjiPiNllMDVLXbgzhpdeKgYm0wl9gBYUzchiz0hUiHb1RjENPWGEIv0GSYfIMZvHqaCmPMJrnOO5W3NJcW3nwKhQlN1oLbXYHx7vwcCEp6qjgOUAQI1sXs5S8SH8niaNz33KqikyX4slNvfnvdY9dhZY= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(6916009)(426003)(336012)(2616005)(6666004)(86362001)(70206006)(70586007)(508600001)(54906003)(83380400001)(966005)(16526019)(1076003)(26005)(186003)(36756003)(2906002)(82310400004)(47076005)(36860700001)(7416002)(316002)(356005)(8676002)(4326008)(40460700003)(5660300002)(8936002)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:27:17.0935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1d4972c-9731-416b-884b-08d9ed0605c7 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4692 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 Acked-by: Ori Kam Acked-by: Ajit Khaparde --- v5: cahnged titles for testpmd commits v4: - removed structures versioning - introduced new rte_flow_port_info structure for rte_flow_info_get API - renamed rte_flow_table_create to rte_flow_template_table_create 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: add flow engine configuration app/testpmd: add flow template management app/testpmd: add flow table management app/testpmd: add async flow create/destroy operations app/testpmd: add flow queue push operation app/testpmd: add flow queue pull operation app/testpmd: add async indirect actions creation/destruction app/test-pmd/cmdline_flow.c | 1496 ++++++++++++++++- app/test-pmd/config.c | 772 +++++++++ app/test-pmd/testpmd.h | 66 + doc/guides/prog_guide/img/rte_flow_q_init.svg | 205 +++ .../prog_guide/img/rte_flow_q_usage.svg | 351 ++++ doc/guides/prog_guide/rte_flow.rst | 326 ++++ doc/guides/rel_notes/release_22_03.rst | 22 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 378 ++++- lib/ethdev/rte_flow.c | 360 ++++ lib/ethdev/rte_flow.h | 702 ++++++++ lib/ethdev/rte_flow_driver.h | 102 ++ lib/ethdev/version.map | 15 + 12 files changed, 4775 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