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 618A543C35; Thu, 29 Feb 2024 12:52:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D5F6402AF; Thu, 29 Feb 2024 12:52:34 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by mails.dpdk.org (Postfix) with ESMTP id C74D4402AE for ; Thu, 29 Feb 2024 12:52:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n2jcYsbfGfXoReyD/9lLfBfTWJohIXOXgr+pMqa979MMqs7K5FY1Kdt1q9kShebmJiwKh10C3wt0pxRLXEEm/s4UMrbbci/uEAQWtj8qyGqwO0jkR/B2s8ENtzJyBIPYf+7cvTK4RwqBRKEBu+sjT4ylvmVzvSAE+weyPqu658ZT/W+7ow5YVdv/y7qNGb3Rswg1KabFmVlv2kjia5t/u1zR0nmGmb8xTgwU3HSpw/XLm0NgH1A5m8Ca2ELTii4CsOuROlYQWYw6C1LTr1pjxNEKPSgGBDOM/254R9Eh4oI2h3vOts/l3RnLaBxq2++Kqs1He3ChalNFUzDNGxahww== 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=+rK82Hg32UC15bQSn3fjQEJ0eUjA2TdZ1VE9s1bctMU=; b=fVdkPTDnRewyoJTBL87yN62QyPXRJIW3sE/Ah22jseZdFEMKEkiM1tBE+LA/wzXPbZS/njgCXwKaUA668qSiZ9DF1IbgztxNAeop6BjNcAF38enS4fghVWXAhHkXnX1/HLCw7pwi3LUEWDUlPGeLIgNtNHY5Cuvb5CsFMkahj2uyJhYgUp/u3DOa+XIhCdrZGsmlTb9al/g2qRWfUk0VwqcMPd8tea7GqQ+U41GAEw/hdaOMXQe2hoT38yyoi2I0tW3cQ4ix1tiT8zK33GAo/J4QmXa/DgUBqncTW29mI3HZNcgJ3P076LiRN0JddD5f1p1BVK/wzP/0ZpDnFD/0IQ== 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=+rK82Hg32UC15bQSn3fjQEJ0eUjA2TdZ1VE9s1bctMU=; b=hxSxXI3+1WYhgaPt+qPSMdSGWYBRVZh2xw1F3cWCA0hD8NM7x5X62wDAi/sxKApffNTjjRtrQFUBjDSq5LKW6uTxKMwpO7ZLp5xogkgwvxDjHxf1fQgy1miZaA0LrT1Ya4CMm5gGAhUjodER94FEu//GQxSY+jOiYz7welehCb2Lr0PrNjYpn97btROjuy9YznBPr/QvABuY3QzwBqBZIowQ2u0kyNW0eG1+rGqTa/4zQ+MTsUYDm6xsWDP0ZQ8VAG6YiCN60Asp1tdeUcpzVv5akZncajcfdzX8udlqM9zXBYPOgFfVWsJiVIQBk7UsARU4k/HtJxyQfiS2o0TSVQ== Received: from MN2PR08CA0028.namprd08.prod.outlook.com (2603:10b6:208:239::33) by SA1PR12MB5640.namprd12.prod.outlook.com (2603:10b6:806:23e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Thu, 29 Feb 2024 11:52:30 +0000 Received: from BL6PEPF0001AB51.namprd04.prod.outlook.com (2603:10b6:208:239:cafe::41) by MN2PR08CA0028.outlook.office365.com (2603:10b6:208:239::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.29 via Frontend Transport; Thu, 29 Feb 2024 11:52:30 +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 BL6PEPF0001AB51.mail.protection.outlook.com (10.167.242.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 29 Feb 2024 11:52:29 +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, 29 Feb 2024 03:52:12 -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; Thu, 29 Feb 2024 03:52:10 -0800 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad CC: , Raslan Darawsheh , Bing Zhao Subject: [PATCH v2 00/11] net/mlx5: flow insertion performance improvements Date: Thu, 29 Feb 2024 12:51:45 +0100 Message-ID: <20240229115157.201671-1-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228170046.176600-1-dsosnowski@nvidia.com> References: <20240228170046.176600-1-dsosnowski@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: BL6PEPF0001AB51:EE_|SA1PR12MB5640:EE_ X-MS-Office365-Filtering-Correlation-Id: 81cbe6d2-bddf-40d5-0dab-08dc391ce884 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0u7kl4j6MKO6iHZriQDQtumLaWCpa4xcyxlUzDquye8f8qg4aARsZ12mS1IL5RMszSKs/DYoxafVHVsypOQBqmpl09P0nIuMpR8dwW4WtFYYbmpbR6F5m+uOuNMFoJpsj0+E9owELVNQABb2sVCzSAGac1mr2ciCvu1Ikt+M8FOzsq+HHukhKOCWhp4eNGaLRJC9AcwH9a966T7S/OnZ5w+ndIuAornzH1fI08LWWDOvGghG4QuYYbAEu4UJ4ZS180+8qG5pWc42ef4m6hKYZwvROpC3YoIVboGvVnj3p/MgywKsJwSm9/C7nR+aqowvRC4ZQN9k7yQ2fvi17cZqjnmgVV/lzp9vcA750CRrxgr7suVuw8Mo690ZpBirnZGn1PjS4bKTw2ApndjiF+RkyROpfqabN/1zdku9dKPVqsS5ZzfDRJFxmgsnevyGrLsXHihUPT0ErauPbo2/U7QtsvTiFxZPTGH/iLoj598+k3w7AELZQbHhO+7/6gWqbkXy8CKm8oxCAZllTYOObb6Jfc5mWywloIJ2sulppsQwNo/+2XIe3TJfzSg4+N+x0KwQsfIXQJImAJ0wojSDFCSQzkv9zUwmnHD4R9u+LcnMSgxzxn+8wR4g9WmLO9zDx/N4g+yI8NRfGKGRPM1i01Nwz3CqwCNyuNqCX7HSPlfHIVij/c6N4eYyuBBtqSeirAOAGy924b6E5CE2U2NXjGhD8OVP5sHMgfOrjTYlyujSHSnxEZKyNOKZfy9N8RGM8PD0 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)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 11:52:29.9791 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81cbe6d2-bddf-40d5-0dab-08dc391ce884 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: BL6PEPF0001AB51.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5640 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 Goal of this patchset is to improve the throughput of flow insertion and deletion in mlx5 PMD when HW Steering flow engine is used. - Patch 1 - Use preallocated per-queue, per-actions template buffer for storing translated flow actions, instead of allocating and filling it on demand, on each flow operation. - Patches 2-4 - Make resource index allocation optional. This allocation will be skipped when it is not required by the created template table. - Patches 5-7 - Reduce memory footprint of the internal flow queue. - Patch 8 - Remove indirection between flow job and flow itself, by using flow as an operation container. - Patches 9-10 - Reduce memory footpring of flow struct by moving rarely used flow fields outside of the main flow struct. These fields will accesses only when needed. Also remove unneeded `zmalloc` usage. - Patch 11 - Remove unneeded device status check in flow create. In general all of these changes result in the following improvements (all numbers are averaged Kflows/sec): | | Insertion) | +% | Deletion | +% | |--------------|:----------:|:------:|:--------:|:-----:| | baseline | 6338.7 | | 9739.6 | | | improvements | 6978.8 | +10.1% | 10432.4 | +7.1% | The basic benchmark was run on ConnectX-6 Dx (22.40.1000), on the system with Intel Xeon Platinum 8380 CPU. v2: - Rebased. - Applied Acked-by tags from previous version. Bing Zhao (2): net/mlx5: skip the unneeded resource index allocation net/mlx5: remove unneeded device status checking Dariusz Sosnowski (7): net/mlx5: allocate local DR rule action buffers net/mlx5: remove action params from job net/mlx5: remove flow pattern from job net/mlx5: remove updated flow from job net/mlx5: use flow as operation container net/mlx5: move rarely used flow fields outside net/mlx5: reuse flow fields Erez Shitrit (2): net/mlx5/hws: add check for matcher rule update support net/mlx5/hws: add check if matcher contains complex rules drivers/net/mlx5/hws/mlx5dr.h | 16 + drivers/net/mlx5/hws/mlx5dr_action.c | 6 + drivers/net/mlx5/hws/mlx5dr_action.h | 2 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 29 + drivers/net/mlx5/mlx5.h | 29 +- drivers/net/mlx5/mlx5_flow.h | 128 ++++- drivers/net/mlx5/mlx5_flow_hw.c | 794 ++++++++++++++++---------- 7 files changed, 666 insertions(+), 338 deletions(-) -- 2.39.2