From patchwork Mon Oct 14 20:52:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 13835479 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2082.outbound.protection.outlook.com [40.107.93.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0681145324 for ; Mon, 14 Oct 2024 20:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728939255; cv=fail; b=JGA8xCFpJREjtTeoB53ZsR5ue5QCDY3p6W2r9bET5oAxvKRLvBqVzxAKLNrgoga864XWWMN+vTiAHl5NJ94f/WQ/y25OYoYqo2ol4YgOk7IwILakNuxZK9TktMd2bZCrQFx7Y2QKoks3piHMc49r03p3FubPtIVA8zPm5cfUfU4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728939255; c=relaxed/simple; bh=10CRcdYe5YuEGYZA819Duf6YpquoHCqN9mVpAuYeFG8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nBS52pRlD480tpFaCMJ0dPYtQ8P0RJh7wrNPTEptkEkLcv802C8iueg7wmz6DYGJQGP5M8oI08WjSby9EZ+pGpMo62vvgM+b+OIij/5kUTe0w/9J5tXlJRe3YbSONuylGLECulIijtA0VYWYvEeK4yaHt1AHWWWPRljL6vqNtzw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=oVMkxdQj; arc=fail smtp.client-ip=40.107.93.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="oVMkxdQj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rkklZOpS47lihUHYirZT9LarRYgU1adwl+a606HAxPHOLwoAXcH2LG1jKa3CbVgmUck6jxgGSALZFLkNXdb7Jpvwtp8u3UY7guvNQjhS3chyw1YFP0ffLy/N5cdmgJBHbfJZCU0MvhrOB9fT4xQQc2H2NW2DLt4J3ad/xI1coB9n4SfHz0cP9LuskjLSJ642oJ3GelYoSNL1Hd6Q2aCgjL3wIXee148d+Y0aF6DI0wOWCJNj+JpfbCegrbRtBC7hbQPAQnu762KLWGspb94C1/0neN16q/6JJc7QfzclauGkh88oI8Sd3KgSO+X5nx8YbobT7/B5g4UocWdjVTS1Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XUZWX2dUG1+Nsz1Y90tJcmRMceJE0n3W73k5Yxv24F4=; b=wq9B8rBMlIOMtaE5xNX0HwqgYg1foZgLmGYk87bLOt7H+Rar0U9MFMvCwJzD1SRY2UnezrVhPfaMjThHNXSx36ufj8P9K0AA7zTfbNkI6uJ3pQz1aV3+Fug2oCpZLBjss8s/CipfLbaS4ctwQG1RZ2U3oyNN9OjVGe+xcJc+pY/tQmmP7Ptw/FU62QO3YBKwcP0UDdHYfzn5ckaWIhw05k2nN0AVCBQ2pZB6/ViTevL+eO8BJHlldNou8YEaPomF2B/BUJ800ebpOKZdntgQjK2MWjGV0/sAGXOah9fP2MqsyqNrda9Z2/U44yumSi83vmZlxsawqU5lwuUzb+GDjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.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=XUZWX2dUG1+Nsz1Y90tJcmRMceJE0n3W73k5Yxv24F4=; b=oVMkxdQjqlaC0pLj2vebGUQVFlu3f0bLV8xf5lIUoGdMBeFLvj7ZcCwvG5AEcqy7n1xHWsF7pt41BGVfd7zGKwOQkkjpg5GmQ6hzjOMKY5OXAEMoTu6+fBdoYsj2Sxfsc2impIMSKb2tQk1cXNgj9JfORiqaL1U8miaPTdZmBGbgoOkoal7PeU1ie3mgHDDa51tw++9kVuO6uLtAA9Fv5UeWZ38psRZpx80h+AP9Acsad0utThS3kiPcxL7EbnrgHM+stbLt+uWS1HNpxNDwQN/encVjR9BX/xo6KCQXLEBUm6N6ZznxwZPazeOxfAh/SkppcLElCYFnIGwD6Ra3kg== Received: from BYAPR11CA0091.namprd11.prod.outlook.com (2603:10b6:a03:f4::32) by SA3PR12MB9178.namprd12.prod.outlook.com (2603:10b6:806:396::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 20:54:09 +0000 Received: from SJ1PEPF00001CDD.namprd05.prod.outlook.com (2603:10b6:a03:f4:cafe::87) by BYAPR11CA0091.outlook.office365.com (2603:10b6:a03:f4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.24 via Frontend Transport; Mon, 14 Oct 2024 20:54:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SJ1PEPF00001CDD.mail.protection.outlook.com (10.167.242.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Mon, 14 Oct 2024 20:54:09 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 14 Oct 2024 13:53:57 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 14 Oct 2024 13:53:56 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 14 Oct 2024 13:53:53 -0700 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet CC: , Saeed Mahameed , Gal Pressman , Leon Romanovsky , , , Tariq Toukan Subject: [PATCH net-next V2 00/15] net/mlx5: Refactor esw QoS to support generalized operations Date: Mon, 14 Oct 2024 23:52:45 +0300 Message-ID: <20241014205300.193519-1-tariqt@nvidia.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CDD:EE_|SA3PR12MB9178:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cea62d5-6b2f-4cb1-a1d2-08dcec9259a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?P8As9wczJkZ1K5VBcwAu+QesnaiUHj2?= =?utf-8?q?Ye5MQzZPITx5o8CVWmFTZ4cqlBqTxYW8rFYD/9mgjfyjXIwuS871gAUZ/s19NihZ0?= =?utf-8?q?GeC+KzSKzucdzc2bI6o6eGjPPWWJfGTramlqXwO1Qs9H673PEzbsfl/KSdgDKwHmU?= =?utf-8?q?3bjk2bxyu4HU4uokcVITszS1Jk36MZ3q1cTdPdrSAJUQLY2MdznDy5AZMC6sb+bHf?= =?utf-8?q?5Gn15qojob6tCLAt8QC08rsnW7sLxYu06flmE8Htrfz4RstV8TA1Uj1AlPjhMvmX2?= =?utf-8?q?w8sghRVQg6Pg3KJ8xdU/Q0m1h7AZz9vi2XAbbcEu2GKmQC/WfQltLsjzhOIUXXo7R?= =?utf-8?q?LMirmbt6GvfeKkfz5bW/Rkowfmd/BtXlGezZaiMn23sCAd+jR+PzL/+oU4VlPaGD4?= =?utf-8?q?T/micFvEAowGPk4DgRbcka2MGwyqoeTtqTovg8oFcPRPDr1KnYjFh8JLIh7mZeaw/?= =?utf-8?q?kE6EJehoW3tBawuoBKNVgd1V0E9OzaI9ThjD85lCRFTwg0j3P9Pj/YBm2bLvr4I8W?= =?utf-8?q?0TgrSRaj9DSi2CgJjuzBe68ia6GCmDaf66ekCp1jb12IoxxqmPjKorXpWJxva+rOA?= =?utf-8?q?nHUI5ogWUDyAGc5ey7jXObZod/x2yTuSVT5F+v26MvqIK39kUBRGMY3yO/iXwy8Sz?= =?utf-8?q?7+EUSMFB4WKxDNqEScT6R/nFwUy8LhGd/mMIZmdEGikk0eW5UklvuqidtevKrt9kI?= =?utf-8?q?ff9axrJJi3+/THPPELcziTvfrdCh5t+PhXlbgAfQ2JfQoaWCni3/Gi8Hhl7TfJyeN?= =?utf-8?q?Nk1yqwAjfj4PvR4R0vBEyZLKGsCv9OjO5Md24G8hauOIdwRVVz4/ROZhkpZtwvqii?= =?utf-8?q?auR9MT8VXixZfugNxyIWdmu/QN1MLyUwdAMpCpL+9ogRNkULoaZ1d2L5FYLpOAN8Q?= =?utf-8?q?tupKcuJU6ZR4veKyGSHMP6FHMaTer8CVPu1L+AgkpZomw2DX5RA1SL98TvzMiRepi?= =?utf-8?q?mmyYMOJDpY/5mcCjAofMdXqceE/i/bmXMoS0m367gaZg3MqAbXRAKFK9sfbqoiiNl?= =?utf-8?q?mOpROytNWdC4OjewE59Qk+/IvRAZH/00vsbvC2p5V75eisDXZIIwtWvMeOQtDIjve?= =?utf-8?q?Asc1DIiN7ww09hTFXQKPJM45iJFoCIae4NJ4aLd50mLiSj9qKvHSdQKZpWlkuXiqE?= =?utf-8?q?iEO7z5ke1/YLQST/64MqOhmfNCgdWQ8aW54ZWnXC23XW4l3uQnkRCBicKN2rUVHte?= =?utf-8?q?5QNaTsxPDIhPoFFCC78Yvl7rTvZLesymWdYgyCrAZnjHcZP2EvDxHjsuMVJyCaRgC?= =?utf-8?q?UCqkCunKD/3GkOFLPEigMWp1gfR3N24i+Tkii2LuNUiB/O1rywCjjU0J/uR0Vj8zY?= =?utf-8?q?x+l1dWXcTx4l?= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 20:54:09.1794 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5cea62d5-6b2f-4cb1-a1d2-08dcec9259a3 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.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CDD.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9178 X-Patchwork-Delegate: kuba@kernel.org Hi, This patch series from the team to mlx5 core driver consists of one main QoS part followed by small misc patches. This main part (patches 1 to 11) by Carolina refactors the QoS handling to generalize operations on scheduling groups and vports. These changes are necessary to support new features that will extend group functionality, introduce new group types, and support deeper hierarchies. Additionally, this refactor updates the terminology from "group" to "node" to better reflect the hardware’s rate hierarchy and its use of scheduling element nodes. Simplify group scheduling element creation: - net/mlx5: Refactor QoS group scheduling element creation Refactor to support generalized operations for QoS: - net/mlx5: Introduce node type to rate group structure - net/mlx5: Add parent group support in rate group structure - net/mlx5: Restrict domain list insertion to root TSAR ancestors - net/mlx5: Rename vport QoS group reference to parent - net/mlx5: Introduce node struct and rename group terminology to node - net/mlx5: Refactor vport scheduling element creation function - net/mlx5: Refactor vport QoS to use scheduling node structure - net/mlx5: Remove vport QoS enabled flag Support generalized operations for QoS elements: - net/mlx5: Simplify QoS scheduling element configuration - net/mlx5: Generalize QoS operations for nodes and vports On top, patch 12 by Moshe handles FW request to move to drop mode. In patch 13, Benjamin Poirier removes an empty eswitch flow table when not used, which improves packet processing performance. Patches 14 and 15 by Moshe are small field renamings as preparation for future fields addition to these structures. Series generated against: commit c531f2269a53 ("net: bcmasp: enable SW timestamping") Regards, Tariq V2: - Declared int err separately to fix the type mismatch with u32. - Fixed potential NULL dereference in the node allocation error path. - Removed "rate_node" renamings, as it referred to the old "rate_group". - Replaced 0 with NULL in mlx5_esw_qos_vport_get_parent. - Fixed vport node allocation error path. - Initialized dev in mlx5_esw_qos_vport_disable. - Access vport_node->esw directly where possible. Benjamin Poirier (1): net/mlx5: Only create VEPA flow table when in VEPA mode Carolina Jubran (11): net/mlx5: Refactor QoS group scheduling element creation net/mlx5: Introduce node type to rate group structure net/mlx5: Add parent group support in rate group structure net/mlx5: Restrict domain list insertion to root TSAR ancestors net/mlx5: Rename vport QoS group reference to parent net/mlx5: Introduce node struct and rename group terminology to node net/mlx5: Refactor vport scheduling element creation function net/mlx5: Refactor vport QoS to use scheduling node structure net/mlx5: Remove vport QoS enabled flag net/mlx5: Simplify QoS scheduling element configuration net/mlx5: Generalize QoS operations for nodes and vports Moshe Shemesh (3): net/mlx5: Add sync reset drop mode support net/mlx5: fs, rename packet reformat struct member action net/mlx5: fs, rename modify header struct member action .../mellanox/mlx5/core/en/tc/ct_fs_smfs.c | 4 +- .../mellanox/mlx5/core/esw/devlink_port.c | 2 +- .../mlx5/core/esw/diag/qos_tracepoint.h | 53 +- .../ethernet/mellanox/mlx5/core/esw/legacy.c | 27 +- .../net/ethernet/mellanox/mlx5/core/esw/qos.c | 669 +++++++++--------- .../net/ethernet/mellanox/mlx5/core/esw/qos.h | 3 + .../net/ethernet/mellanox/mlx5/core/eswitch.c | 2 + .../net/ethernet/mellanox/mlx5/core/eswitch.h | 25 +- .../net/ethernet/mellanox/mlx5/core/fs_core.h | 4 +- .../ethernet/mellanox/mlx5/core/fw_reset.c | 9 +- .../mellanox/mlx5/core/steering/fs_dr.c | 35 +- 11 files changed, 435 insertions(+), 398 deletions(-)