From patchwork Thu Jun 6 14:49:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688626 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) (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 9E1F6196DA0 for ; Thu, 6 Jun 2024 14:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685553; cv=fail; b=t3wBY1u43qOTlomm9ERTTiKuPVIsEknCouS+s/czDtjMvi/yiXwba097xbqMpt46IW6x5Os1eudyo+fcGNHslxvKpYNFNEi08WgnsSVyltDLGuZ9QLQ/ugf2QDINlXPnk0KjBLfPaI80K/IqI4rN5P61IhFCNp5i49j4LyuUQo8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685553; c=relaxed/simple; bh=J94uTgKvngQm6eCXUfsqxruJ+fGKdFUtF4uVCNdBUOE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=idoczTSvvPNljC0Llhcc2K0pb0riqYdXc7xOp4u/S2bB0MnIbhlvN2LEicFe/SPWNZqWgR6oLp6uvmDQd31wY9wb21zR0/9+mvmSDf84y43BcfHNYICBreJdOdsxQwF42ZN3u4qaFxImdK9O+5845bK3XyZUQ4oNzSFiAe1KWBE= 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=e3bLSZxt; arc=fail smtp.client-ip=40.107.94.45 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="e3bLSZxt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CqpCTsFUEiMWT5eV8GGXAz7NiF/6XIijUksaPWmxQ8NY9VPk7la/EoegyRK1FcSBa+6jUlyhBcaf6rysh/FguJiRSgqrEtAoDz0bW97DTTo/MhCZpTjO5WLPXHrkeR138sbxaA6K5IErZRO28ocLnwgALTc3KqGBKXIGf/nbcTesAMzCYolq2JO4jN2BNsPo1c3pvUva2HZ2MqFUdNtla5HdlDpAh+XRB8jkvjrynbwcbvmxawu8rHVNiboGIgmKM1Fvrfa3kMnjNkpkb0y/OLnqs4WndxfBw2dF4WfnsmrCc/W5D83IZnxpFZ/FKpoOFZ+FX68q/IVTDKdR1GPLoQ== 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=geS3ntuY2zSXEI0sWCwKDSGxETIh4xi2BNESpWCd+Ho=; b=YpV84kO4Ar3b+ljOjbz9wg+8UgF5dlqyXoXby7b7FcGPmOEgz/8a1WA+b4azr9GlCpT8P1OsdbgDZzY7T/XbS8dk7c4eRuxjwFfOc7IcA/NTEIC0DvV4JdOy6kwmzk5IL+FtY4t0mxiLRfcRqgDZO0TWIAtfDWPZbh9M+zHIfpJP8pdRHrkdDQPz0QBBSlxrR5JzQtoDxPwH3ie4FUfZ9TooXz3neB64qIRKRHTXaDCibHLzCFSk841pG1AOjpaKJ4zSqYF9PcyfHWsZF4iTDgbyCt8qFCau5REc43mSb96FLc2ApRAS4zZJseuhhAr3ML1le5qPk5/5JTqjfEkW9g== 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=geS3ntuY2zSXEI0sWCwKDSGxETIh4xi2BNESpWCd+Ho=; b=e3bLSZxtoUE7q+7deo1ADlzcUJ/0LmNzt9LG5zyIdUUbBVOwNQT4fWlFiecSzB7pZy05BmdzVIMMiZvT47uiQXv+RPBFQo74ZEqulsqU1BrIDwj7gukUCMkBbbPF9S330YVxubLXUmIQPG8dsMRdAtbt0BaPN01p4e4ID9RcOVHa70dcoha1G9lecIrTprKB/ZNBhHRur9FaRlBn9jFMLLOdURc+VIwYAnd8DYMsh7AHib14Lyn0XMYSWzOXkEscHYk7/q+oxg1hnSEyOso4tzdUTVyIijRghIw84AdXKn9uTMB+nbT5WSpQeLDJ3NawIezwEDTDEjKLHld1jN3gjQ== Received: from SJ0PR03CA0102.namprd03.prod.outlook.com (2603:10b6:a03:333::17) by MN2PR12MB4406.namprd12.prod.outlook.com (2603:10b6:208:268::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Thu, 6 Jun 2024 14:52:27 +0000 Received: from SJ1PEPF00002314.namprd03.prod.outlook.com (2603:10b6:a03:333:cafe::26) by SJ0PR03CA0102.outlook.office365.com (2603:10b6:a03:333::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.16 via Frontend Transport; Thu, 6 Jun 2024 14:52:26 +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 SJ1PEPF00002314.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 14:52:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Thu, 6 Jun 2024 07:52:11 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:06 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 1/6] lib: objagg: Fix spelling Date: Thu, 6 Jun 2024 16:49:38 +0200 Message-ID: <0176885fccfffe7aaad6fcae774ff336bdf75c94.1717684365.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: SJ1PEPF00002314:EE_|MN2PR12MB4406:EE_ X-MS-Office365-Filtering-Correlation-Id: 45b97173-651f-4f4a-9e71-08dc863847ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|376005|1800799015|82310400017; X-Microsoft-Antispam-Message-Info: oWNYVALntSUFM8iqIuRSfG2NRhKt4Qv0Hnz2Hc509Xju5DWopFSQnIGu8tM7icZA5Xe7bANq6xZs8+no1IwqOOKokLY4rr+bQn5nZOFg4rmOaaIO8+7SANZCgJRqdx601Al2Gee1BUzJZ2GqYMqZJMTl2l8u8qdC7CkrCprJp9xd6lxBAyiXIjFXoGZgQUhpOCi0PAUuqem5cGLJ1QzvWuDjNL7eQ9WqwhB3bh+/HGIc+42EpU1y3rxxIyYi3fYZcYtdbHM1FSV1jJwU5x1iX6hx8y4xqj+JCmM7BtOdfR71T9Fncri7MlFJ2bY5FvOpYT2HKm0Di9lrHdSdtytd6B8Hrw9MWMPebeDdukLf41SBj4KFr4Jv7d+4gN5oxoIvC32ZU7mMv25PEOugIgNtNaVtOmViSRKhLBYW5KhRuUuPe+VafGhzlvBD6SaqB00ij0cu3NpHhysl7khcxbJjIWTL56jj+1jb/8DhHLJmL4l9YnfRBUAdGvzT9jaIf5tZ3Vjo64AqvuluKycGBvzQru1VsfHZC3NYG4Bv2kNOZLeRTW8Vl4H2ZBuj2k0Eb9A8eFlEMWu1ql4fQ44U3FGfkbP5LkR3SBj53DJp77miSrIDHEoH9oLuQutP2Tyg9jVfpO2pH98OaC0SvQBJMdigo0aqdctCRb1WJ/eKXdLRUlozkEIq6zWh8rsjDLSv7dzqB339eJN+cDy2aZtENweAKMmlrbRolmBASe4oIKbq/ZgQD0SqYYBaPdks7UclHVoVo5suLw/OPfkuRyQ9vHbOsNV83cdrvAr4Oe1o1S78hxo0dpYtEXt/bivVTGUNPgwLwH+cCNhXFEE8mPDxrmOKTdORE2LFNzEl+dbY2TfOTX0kGupBbRgxZQkBA+shP9y/ia/2EQQlEkqJDvlyPdnlXhgZ2w+mirSElfOtDcewBGgMaKNn11VRWv6kBogQAqx8wH628J/b6T7PCCsrAxiMwszcz9sSO6ssfyL8UEVK1Jxd6Hy94Xef+adlO9GD68iT5LLQohIUpMeFZk2UnZ1lvFR2Iwpi+kHMPZKXu8RXaVk5+hVekCVAnt2tO85NDwcjSHPZ7aKOI7YT2zzYXlH95alHLiVeuCAv0Uoa9IqbeI6AtMEsHCjctkTxFUNTlXpMBvscGbeTTQcNOZEr6BMul1DbVISZWCuFECik3jlR7j+9uecUoJx+hPJk3PHq9R6TM3691XoHl9tr06ImWUtHHwXCFbr2MsXrCdy34+WRwqPSHRkQUej6AuuTB00LQxMCCCBA8k5WbfdSvtZfG4v02OeDQfIunzAmdGBy+B9dIea7+GoNDEIiRr89mI8RjX1Mrtnav7iSwbCger/KPExmIx6eBj9FNIqSQu75r/j6I922FZtmmPbb6bfBEEibdUxTNMCftSfd/GhutaTRifhdRg== 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:(13230031)(36860700004)(376005)(1800799015)(82310400017);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:25.8800 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45b97173-651f-4f4a-9e71-08dc863847ca 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: SJ1PEPF00002314.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4406 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- lib/objagg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/objagg.c b/lib/objagg.c index 1e248629ed64..955538c90223 100644 --- a/lib/objagg.c +++ b/lib/objagg.c @@ -421,7 +421,7 @@ static struct objagg_obj *__objagg_obj_get(struct objagg *objagg, void *obj) * * There are 3 main options this function wraps: * 1) The object according to "obj" already exist. In that case - * the reference counter is incrementes and the object is returned. + * the reference counter is incremented and the object is returned. * 2) The object does not exist, but it can be aggregated within * another object. In that case, user ops->delta_create() is called * to obtain delta data and a new object is created with returned From patchwork Thu Jun 6 14:49:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688627 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2065.outbound.protection.outlook.com [40.107.92.65]) (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 0F29C19A28A for ; Thu, 6 Jun 2024 14:52:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685559; cv=fail; b=KafKsUZdsjULsfQPVsw47Co++01GEc5kesiIpUJsQg+fUZNBK1vH5VsnT4w2ejI++z2S52CUEVv8+pKRHbD+oLWqQxuy2GsWmbnfP7kzjNCbG2iriqrn8cFyjXge1UiFRojf9wtLTyaUbYD36N5XTsXlPNdeo7DhjNFBs3w9kkk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685559; c=relaxed/simple; bh=5GJqYavS/pkzOndgeJcgJ8tdg4q4+uNBrwABS/1u4Qs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FATbQSHbHqEtojqiVWnwzzeAo2RwH4eVZJmfun32zWbQvd7jU/AmMWMs/ryovkd7dtt9V2Q47t4xrxQhBELRb8nnTKbENGm8Wevb0mfXXu/GO+ocTN3Qemb2OhUcTH7cUUca2/HHiIrM1R06mlAt19mvsgMkchzl4lDogjY8Qps= 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=G67e0wW0; arc=fail smtp.client-ip=40.107.92.65 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="G67e0wW0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kVnFYgxj3uWPH4LcD/BwGb4aRrpXkUM4HmXblP6yy0DJs/vFQyotFtKhGvJ88PhiLAdrqsonViEHK8TuKljVbOApwsjuMFohGEtWX5m+SBLoPXl24B+/nz2cjkEzMD1D5Wpx8rZhx952zpxkXCh9I9/hkIDh3TRTczTCElMuLPUCSIQrOFEqRru+gR5UcEiVOqmRhjuGkY/fa+UD5Apslt004unjQ+ViIC2I9b/rYaXKDCm6ijX7YDaUdlyHQ2bdZgjyCRGojqW+7ZO3hADqEIkRUXW1PX/entmni72oyQPtj7Gl+dcWhSfnrFj0+bpJb6HPTAHJSEaWuZV/gVfNaQ== 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=JCzn0Ck+tun93I4l1v7Ts9yJn2hvDSIoVQPI4Ul1Ca0=; b=GWdZ6QRidjgwDDbBO8z80+MQxT5GDCHj5plsgFaLI8axhDe91W+qRGtTLIPT6gO+4cqYh6H0lwI06G9Dg5mIskXGEez0I2IdSdHKAZPkzd9w3yyuCX3LoxhfSlZ6Y9fjlWOWSANstrH/wX7txoojrNq0THrt34WTjmfm/G7h9CQykLVRDaAmjuzgpodVO/PC0O1JdCZ8gHvSQRv4rDbEcNY5HC0FMLKC4xQX6/gyg+jBGLS2xlZi6NPnO5y/5EwwD+CgJXXyeWipZeZ7ZwAZVY/2JFmrKIn1/JdUpOcUzbdEJShF+EJynfzeYIpcL7OeYl6eZlNkcdRrvjEFRTSHoA== 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=JCzn0Ck+tun93I4l1v7Ts9yJn2hvDSIoVQPI4Ul1Ca0=; b=G67e0wW0YJao66Xez1OlNVwJIN8UIB5ObwkEaaLzOUnzL8x1LtSJpwnvb7DUdemGzyyjl4MygwV/dJP/BeTGznjFEnkkX7xO5Zhxu0cg08+9WML5BBVZfaZ9ofyiLdWSwrkx3VVvCCSxr4fRihC32wJxad6cljjrdIvZxCU0t4H73dwGoE2V7K/X0bSR1hVt+GVPFwIaN43jw01uD6buER7B/dY1dKIxI4juDM9COupCYJDNf9HO+2AmjFJbmEGthWP2sKd5i6Dq+GXagBYbIyUKYFLzeuJv8F0ph5fvANerHW3hDFfEBx8hROA9n5XDGtahOdwslNBKQxdWWD1ybQ== Received: from SA9PR13CA0054.namprd13.prod.outlook.com (2603:10b6:806:22::29) by PH7PR12MB6634.namprd12.prod.outlook.com (2603:10b6:510:211::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Thu, 6 Jun 2024 14:52:31 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:806:22:cafe::f2) by SA9PR13CA0054.outlook.office365.com (2603:10b6:806:22::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.11 via Frontend Transport; Thu, 6 Jun 2024 14:52:31 +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 SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 14:52:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Thu, 6 Jun 2024 07:52:16 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:11 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 2/6] lib: test_objagg: Fix spelling Date: Thu, 6 Jun 2024 16:49:39 +0200 Message-ID: <9615fdd350c154c2c15101906e3e9f961703e5a2.1717684365.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: SN1PEPF0002529D:EE_|PH7PR12MB6634:EE_ X-MS-Office365-Filtering-Correlation-Id: fd3d505d-b160-4393-179f-08dc86384a82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|36860700004|82310400017|1800799015; X-Microsoft-Antispam-Message-Info: 4PvJaqPNa0JeE4FDzP7Mjt2n2kwcBSQe//CYDYxt8hNsJ3KX0Ts85VhL6jIQtPuFHUL/rA9/DIVEymMz4E4MtLDg+TcJKqLLq+F1od6t2IGz2idKhbXnz1CTzg57cBnw1VJo3xfiS+CymKFTn7Q8hZ1HMjmiBnTdXs2XTCfIznF9JmLjMMS3UaPPz94LGAR0Zv+TRc61tMcpN2azpQWziEAcNMiqhS9j1SrdA/T/oRSVnEQ7O4npbVtV9EjGS3Tptz3JEyjvqNBurL/qF21msSGuLUh0WUf3KEqeZtSqInTMnVmm2fZMeC5QmiXjPfj5UIoVnlsOf78CUIBxwcVqlXMd2esHn5sNSKd3qSWTcDp4ga0oIIVDOJwAXoOxCtZIawah5DVixbKE1faONOzTsvUKawXO3prrmY02xYSrAoGOuPSEkKS4Lo1aLFNBc91vdZAcTmKjrkNuvqYJaHm6ge9c4ggPra8cGO0bkaztNnVBrZiW/N1UlGNJJvc/cKvlEj328dWsRxbptR3J0HN5BCxubJwRQyufRLwsvuDFWj0lGz66I/Nztjyk0MD7r5B5NY7JfZsIQ2sPHAbI1Ws/0Sw4wvvTU/Y4QEpQx0u4qiagiXRcxQ1WqBFhXAHWcNMCqMA5qnyXO9Rc4KuYB3/EaGgbx5T2uAZG9Sm5WESKuZ0bkV1Dt9AVVUAYIeEF1+QJ9At2loEGKfLYxlY4J44ExmeMTL0omzX3Yjaglk8GcjtXHiqGSzAAYndTxoVBYNeXQxNStB94aFOfBmZNARrz4Ps42A5FJsIYo+lXcnKIBM2lJo4sn8+JFLC09Ay+K7BY1FLN82WOrgxjVd9URv3I69NpeDclwadg2pBytGJv9kUAtBRKdicqAd/LpSVBC+55fWF29c8sP+aK7fs8vK6cNG5TObkBxir3XN/52d7J1GK3rZhsLyMZxxNwMRQmG5P0VhZ90g1kiDc0Sh7191hd0reNhlqGXVvYQhbKsJ9muZ429d9L1ZhwuzmnK71VhrqN30OCXXi+56/tl6kqdSosrcdkGrMNHBtnAHwHvW4pAPJ3PTdxr2i3PG+JVSza9ZyzvHAveTd28PsfenTpBsYVu18VUO6dVqPg60J5Y8Tvb2zOOiKxlc4b5xNPI9JQRkNHTu8OKbSrDeuJHlaszL274TlXBiuWMHqtp4Z9XLfkPc2HsR4Z3rAkKRbdLObPbrGHHk1XVie8jzgiMcYC0Fvs6OVigF4xoWAB89kdmnT/Tx3eidTpkp4hxLQzCBEWi/K7bGjwxbns5Gfx45gWlKlBovMBxPB19i4JCBGGI4y7Dy4HTPwHiSgZ4aS5B2dV95jGIVVzTCkUipxjgdOlaq88g6b2hW2qGeoKSjAfiRINkiCL8T+y7I48/4EsRAOxiCgKgK1ELGrODwrLzuDr3OkskQ== 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:(13230031)(376005)(36860700004)(82310400017)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:30.4535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd3d505d-b160-4393-179f-08dc86384a82 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: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6634 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- lib/test_objagg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_objagg.c b/lib/test_objagg.c index c0c957c50635..d34df4306b87 100644 --- a/lib/test_objagg.c +++ b/lib/test_objagg.c @@ -60,7 +60,7 @@ static struct objagg_obj *world_obj_get(struct world *world, if (!world->key_refs[key_id_index(key_id)]) { world->objagg_objs[key_id_index(key_id)] = objagg_obj; } else if (world->objagg_objs[key_id_index(key_id)] != objagg_obj) { - pr_err("Key %u: God another object for the same key.\n", + pr_err("Key %u: Got another object for the same key.\n", key_id); err = -EINVAL; goto err_key_id_check; From patchwork Thu Jun 6 14:49:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688628 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2055.outbound.protection.outlook.com [40.107.243.55]) (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 97FC61A38D2 for ; Thu, 6 Jun 2024 14:52:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685561; cv=fail; b=ilR/2tgntaH4U54AOPG2zK0qpPgFlO8zecJ74N6ESvJM2gkksq1hc31lT3wHgbFLwEPZsCwRMVCmVFfj1muZSt/qYChy4P+eIj5h8Hb2HBmF/nH1kZFxpDwGOsabeanc19ZyULYEu8HrZgoeQKntGgvco+oqe0YV0y61lXOg8yY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685561; c=relaxed/simple; bh=VmUiT8ve4nqHHs5iJN6bred2pUOS8BpmzfP1wyn9E8g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W5/HECIYb4AWR7r6vFtntuIUJdyGZqxARBpbcHFkSgJJnzbEo4FzFYf/6eVteRsZidVT54Ma3B7xrRCN+lpnwlRUHp3cxLBnmGuJLzo0mItHhy+xr2raaeNb5NmDvBIRJ8iJsWwhJsuvLtDmKrTTmSWD2+IxRJhG5oKt9NHghlU= 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=L6zoDsm5; arc=fail smtp.client-ip=40.107.243.55 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="L6zoDsm5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DE5re/L1XPEHuXs3J/yxgCe55Ip0o4JsTn7LOdRk1t9Vbm6jMAXZjX38DNsb5MzjNfj7mhqShL3Cs63Ilg9RvnqmKNSwCGcvoiV6WGPwbtjYe3HAq3OOcgSOEaCRm3ZDD53e6n91uV/6p/BCC8+VGyQSFqfYMKJ0ytrcPkuXMBtPv714oQIvQpGz6ubaLp+QKtItrz+tkX46UMTgW2kB3Kq3svD9MXPyNYwoXYKdHJdA08b897mmc8Ct9C7R5KEaiECop13k1NA0PdM4PQnpIw+cgSwbBdVTvU+Tfuvokm5ugWnkGY7AxURPpMEaowuzSeajvBb7kE8YZw3yPQ7ZwQ== 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=N6cUjbTVb5tEjGbOQOLhcX5aIGiWLSnYjHVbIolRJeQ=; b=mB8KqgR6PaqQUucAc5Ur+zo5K4UieIjjGOf3FVMdfXGBczB/eRIDrwCkp3MJ30biFHVgqtz9KDih22UF51qrG5uTdDc9RBZOI9Q+X1Bb5cveXKwIGrgAl2dO7Utdx7hhBhCCUNNwDWIKMcqxo44EIvQxX6kbxhF2IoDRrPUXJ+PXiKvW6epU5ipdhsvkr+FzFdQiRXxUTLW4Fb+MpaZSU7Y+dke+4QeQ2TnjmArNzytFbbE6tEmBw8OZqqhuE94etbhkmSET1BD90R5NvpbuYWkeUhuXekmgdKLixYWSFLXhaWYP1EJaFT43/0FlVJm6CWYuys3U+9oXDsoNetaewA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=N6cUjbTVb5tEjGbOQOLhcX5aIGiWLSnYjHVbIolRJeQ=; b=L6zoDsm5ADWj39DKlDyKG3ytog5QX1OE1yEXu7Ih9rveZaUQC74i5+paiLEJXSvRvpnAC3DwOTO8U+hUJKXr9mtxrV95Mb9oyldJeswP/kTnFkDnUS3BZ/gxvsTWzY07Ndz/b//fyNWUFgQA+LElT1YqQARTJu5W5Fm72VF+m9Wr37SXouiSE0M8bzFRvSKuz4W5KAzZMYSIHPbOC+799bO1dVRnIOlTVFLKjvhaWU00rXejxRtIvqUb1miumzzYypZD4xuA83HINLG5X1+ekPYzInQTnpjPdZEcoWCFwOx0bLWjF1fhloQ7bCwuLckY5pX12pmMlqhFSZOG1jLl1Q== Received: from BN9PR03CA0927.namprd03.prod.outlook.com (2603:10b6:408:107::32) by SJ2PR12MB9241.namprd12.prod.outlook.com (2603:10b6:a03:57b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.33; Thu, 6 Jun 2024 14:52:35 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:408:107:cafe::30) by BN9PR03CA0927.outlook.office365.com (2603:10b6:408:107::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31 via Frontend Transport; Thu, 6 Jun 2024 14:52:34 +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 BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.0 via Frontend Transport; Thu, 6 Jun 2024 14:52:34 +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.1544.4; Thu, 6 Jun 2024 07:52:21 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:16 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 3/6] mlxsw: spectrum_acl_atcam: Fix wrong comment Date: Thu, 6 Jun 2024 16:49:40 +0200 Message-ID: <2df6368e0908d4e752ab9c74556bf2835762f330.1717684365.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: BN3PEPF0000B370:EE_|SJ2PR12MB9241:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fd05d44-9f07-4161-4267-08dc86384cc5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|1800799015|376005|82310400017; X-Microsoft-Antispam-Message-Info: zoUOYhajicBS06xEH74Hf8H/c37pVQBLu3ayf2oJyMVpuwozTtbNWmn4uTvreE2ieZ3816Qf+z++6w01jjTDba93ex3TbBbje64vdsiMxBjA9EHqv8T5IQnkXBzxBT6wSnIiULgesiMgPK2if4FuFFDc0LMiq7+YCAFJFMqXEqaoOfDRMxB5fsP7Ko7m3HkmVR9zbbXIGgYKiEwxeW+x495mjns2Px/Yzo/u7IffiWxS+HaZwEROwErfOLF9pjF6irhfgv0PzBhIIe/7UAdpoAgc0qRh4Kba9apUXqQGjnH+jAeleU37/0oldggtuV9v5ZXmZrk449smGnYAawI9MqmBJmBVbHoMl/SX/b/rRcTISf04AmXdmhFdER+CFL76sV7VHnzOZcjyCOAUIWU3wCjdsxyAFrTBjvVTrey/sNX3G7UVxujwYzVq+9O9Zy+63D5Pm7RuAYfWBy7ua0ThQw6vrDazr4NOqltru2PtGO8XyZzDBH7gP6QaMbJAHKuMfQSncmvI4psBZ08m9IIO+tCdD+U2UglXW3cAUiwSnsOJEVGOM6uPc/Z0YoVNilh3rBUR83hqjrxBkzRwIQ9eHr+g06q2t9IFEDbfWvtGDu7cOseMSXMQczLXB+0VNCvl8M9U5k+9/7SIPbpCj5NbwHXmT7KqNsQKz1Ag8EpnH6jJJe5BUi4iggwNMeL/qd36a5TQxE87UrX8ncHsy8zF4nlUyw1y5xVaRhvU8DKoClENN+9vDOhjOFQV40rUlQGwb69lM/3st90P0lEld4ktyo5BVoehpmnyM7T9x7wake7sOzdZUbVFDQEtWRBfYI/EdK97RDDOItD7iKlRPyN/EMIOsxc3+ef5nxhKoh2BVexi+i1PO3C0f+xLBpqvi3MOL9fmfNw8AK9g2OQGE5Nu7mdgEyIUauRcG//rNwE4d42ZIff3fmLUfSBPo8OKfZcQgc+cTZug9yJLL45JbVJIufcyYkt3Y5AGZZgYTxpDpTHc4UTG4d3U9AkEPsAI/LpLyPKkDufkttgfziHuh8skJuY7x3E3ZzYZqeHdcUSTPXEXL+f8IULPHm/XMYc55p4c1rAvJeDdM3Kca2wCXbQyRU8E/8V88kRgahQyOiDCuaHfepFOhRf6/p2iBCqQZAgJQLw3VXau/hVL9F5X6hUBqlETlfC8BRz0/+yVfdLAlpD9C3UIOnY5NCjrwU1GDBRw3R7vCy05imS97mpdxAWhdI+u2PzbNWpKn+wPiyn/UjDiD9jRSSkR+EfVGGFtEL4u5LAwOzaxTpPOFu1T9GP/dLkdoSQAtSRNeimNShWOYZKw22EFrpGcbFNkl3mLFp8jMPcCrfEQJ4mxhP/OKongF0/C2sGvDaGHjCrRheeEyv7L74N1T2DezEmyeVkLSvQRg6YOnfSSsK/4gUmt6lyt7A== 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)(1800799015)(376005)(82310400017);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:34.2023 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fd05d44-9f07-4161-4267-08dc86384cc5 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: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9241 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel The key is encoded, not encrypted. Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c index 4b713832fdd5..a7473e782b56 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c @@ -491,7 +491,7 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp, sizeof(aentry->enc_key)); /* Compute all needed delta information and clear the delta bits - * from the encrypted key. + * from the encoded key. */ delta = mlxsw_sp_acl_erp_delta(aentry->erp_mask); aentry->delta_info.start = mlxsw_sp_acl_erp_delta_start(delta); From patchwork Thu Jun 6 14:49:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688629 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) (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 3A40F198A2E for ; Thu, 6 Jun 2024 14:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685568; cv=fail; b=nAz1/0kKmTeA2AeT8iy/NzpxRJxYRPUoz9yLTJISKCoZUT5zXbwVpLQNcxjCds85EdjxHq1r/jebHuG0YKVjYOIzPrxqSE5GmFc+yqZTIymji28rLK+LgIvKiTyQ1YnGRbxuxl+KuauK4X8OCdA64enoLV8MydvRgPSN8HJeSXc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685568; c=relaxed/simple; bh=wT7/QoYwvCUNafPrCTGlrnVbCO0jAcFDoAlzdjYMbTg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TK/g2Tv9aBNJKcSrFzm0KUL/Q9spsvMciTmPiHkkxupG90vp1zk12OSK8q930iotyel3c58dKqzpJKgtSPXTl+y8wXbCALXTFvm6qA4dIE4iJSKDdSdFeth0ni0Mwpp+I78W8G0xhatWFTpsGzxrkJunqHLcFSfUIPi9DIIGoqE= 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=YNv2SQSb; arc=fail smtp.client-ip=40.107.94.52 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="YNv2SQSb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KMyOG6wV2VQ+XaJe/K5JTQdKTGXaz8rDXjnwFv2w4V91tOPA5VFJzfNB5hnmx0DfyjwurF7UOR0TfX9OOwPR9z9j0r4FffAkwnRq1Ww2FF4J/q5dY2Lz6T+UwHXYT4Z2Va1xtUYaTDn7T3WjcsVD7slhklMjlyNzlnD+Q+iy5qRyx9vZkpQqGkacSae1uxYAG4r7G0Cf5mePJf/3pOoHiXa7aVNUFmq8Z/qBMmLuTbTlx2Dq4omt0b01wM8L7NA+ywMefy0mc2hXTg7wo8Ggw1ua2HBpBOzZwb6qEdKCSzeTfTLpMyUX9UOLMDqaL3XZXQ+53Fv6PLUlOmEBV2k0eg== 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=61aW2yK2fXIFv+5jOXYzKMgWbcTcAgi/ieODbDQPBwg=; b=VJmvY9/VOm3KwrN4KgDNOtIJcZheMul/DedEx2sjh6qo9BsEEOu+C5PBNxWGNz9DQgGn4vOgQN5a4uFr6x6uuI/4CYEUZhZXimhAiEulU8hHBnhDB4KcbBfSfI+bQN8k7IzxLWtqwaEai8qW8LUJqCOnaFpST3ZwATNKn6+TdGjTGQoUgNvwfkYcqjMN55K7K+XJdYcDBzV7GRXkhd2XP2aE0rgNSP+IRVxmqrpGyc6cBdUoRa34leo6BogD3wYf256gACjTAOBEDwOdoYN8XYKVNQZKnHd4lrlW5G5nSPIdOLhLEoT39bmJVQBj9XSeUpTv4qz+dPQ/acx3zS61iA== 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=61aW2yK2fXIFv+5jOXYzKMgWbcTcAgi/ieODbDQPBwg=; b=YNv2SQSbB1hlsVkf7vF9MiUSC+Fp20cOp+Fz4J8Ozgfx4HAQXgp0XjxDTrik1aYqv8anNiOqvrZgeP/8vtrrFU5qIPRYR+3IFNjhlf11ZMRG4V94ydvsW9a4VJIkjt5COW01qXsBdF9oc5kNwBxKiw0Pp2Z0ny3r8jMOVfPvFJjXJlRluBo/sBpGeimBRQIJaxmmRyxUx6FeDzYsnFqwlFSAib3Ng5GyjAntewFqLp5RH4F4TaH5Cim/O4lLhNz26HfCztaciXdk6BpcozJwMzaXNCfg1GW+9wFgHn9m9zKE5lGLGYUY28IUB1AAED+788IdvFqbC8icSvSewlFEcw== Received: from SA9PR13CA0043.namprd13.prod.outlook.com (2603:10b6:806:22::18) by LV8PR12MB9232.namprd12.prod.outlook.com (2603:10b6:408:182::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Thu, 6 Jun 2024 14:52:43 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:806:22:cafe::37) by SA9PR13CA0043.outlook.office365.com (2603:10b6:806:22::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.18 via Frontend Transport; Thu, 6 Jun 2024 14:52:43 +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 SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 14:52:43 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Thu, 6 Jun 2024 07:52:25 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:21 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 4/6] lib: objagg: Fix general protection fault Date: Thu, 6 Jun 2024 16:49:41 +0200 Message-ID: <3de2a4e3a61b58f948b3fd3b0f0763fabcd9a819.1717684365.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: SN1PEPF0002529D:EE_|LV8PR12MB9232:EE_ X-MS-Office365-Filtering-Correlation-Id: a1dac28d-74f7-420d-0b4a-08dc8638526f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|82310400017|36860700004|376005; X-Microsoft-Antispam-Message-Info: flINteBcV1P8khnbuBGBgSbBVsTdJFmcICegK1jieqv2cHJxJ8+zd/BIXDbZSJPrBxQwAShAU7LyGugaS7j+382OSwQoVBKvYn4yPvXdZT64EtOSqAosbWv9IZ7sGGv/WN6EX1cXsB10NASy1paYyVetrHrCZ1RJCmrp5BMDceyozOU5E4CMDK6AMSAYWyt9LPb3Sx5ygv3D2gGOLqTZNgfuOKZIZZW1ne9ovgl3WMQpLk3xVb3A7VbBQKaM73aR1n65YTA4nHakb/p5f+i/OT0gFT/+4RWvsyx5Qvp88TgOq2jrtRfX+dL061roJG7fry4RP8j4x6RHIgtO2FpzqnZ5toqolEsl7ZID8Was1Eue9Qe+6UJz0C9LgDoQlk2DxWwX81/eFa6HjUv41pNOQlyxl2RhQjagsNvCbQmwUJn3c+IbIe3s7Ik9a1bKiLUmRzPf2PGQEuL8HyyrMQYZQSGv8XNsZ+FCuJzDM6bBnHwI9jC5H+IZd0ULz1II0SW18ZC4xJeBKiIjzSsL7I+nUATDZ9E42Ov4olQv1wGYWIm9jQrdPtynYae+xdax2wH8eOkBdhMKiejXGH0DX1Yz408tpqGZR/vt0eok87BBRnAm4axivilMc6vDyGozeMnOCFTR41ersTq8/AdIyqR9PsSFmXWHp1ZCRFi4NpUJGDKYHG1ZCMlVnpsBaAXWYl6wmniCyxkmJCojkuPyURzxB/SOlxQA6q06Mh5iaR/tzCcFytLCyzl42sf3zChMm15p3TAOA1Qbj8L1CcJfHXk3rJZAUIB0Mi9oOdXbQDCPoSkYkxdZ1d7p8Hoimajk0YCULz+fnx5wlxpWJnr1fk9tFR9YTXCk3l3GTZkS/e4rXOlq1Rp6rGdKTZrpbk4rD2A6IaMPPig3bpwdIr27A7umlE1A/LGJQfkEOdHOg4l6sYDLuc2XI/bIh9C1fRbAaGK4xRvFZTULUKj8JJiMrFUrxcIHS8JQNLtf8KCXD/6ibxruNe3wnax9bfCQAjjAPTLGbkzs5JQtQfjNC/vDNiXRKLS51OntAKDV2n6TvQj0JcKPq2oId8/7Vsc+99iAtLId3MDsJDmCLNquGTPA1tkBg6c4n/9GwTqPHh5aWd+ItVSlA+p2yGb7T4xEKFOTs4PXndX7ImoySNPiypfQHN+7lWLjD6ptoRcXl8EVomVJlB1IhGu5QbDw0xL9f6YShWLT3z3uck1SYrdTzk1eMYt2NE1myouNs636U7cjmrL95gmXEBJWfLB4wD7YucJ0QnOMx+KsjHOSb0G5SZt3DBZzHUrCi/pvOYA/5lvKS/h1V/V+MADzDgsU4u3dnFa1Hrog7cL/en1Ejx5UTyY83Anv7ual9qtLQ9sjnReHDyaqUyZ55RaA9gf84b6geaMfHp6kCwavYD8qLmmwvds7oO4CHw== 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:(13230031)(1800799015)(82310400017)(36860700004)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:43.7504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1dac28d-74f7-420d-0b4a-08dc8638526f 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: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9232 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel The library supports aggregation of objects into other objects only if the parent object does not have a parent itself. That is, nesting is not supported. Aggregation happens in two cases: Without and with hints, where hints are a pre-computed recommendation on how to aggregate the provided objects. Nesting is not possible in the first case due to a check that prevents it, but in the second case there is no check because the assumption is that nesting cannot happen when creating objects based on hints. The violation of this assumption leads to various warnings and eventually to a general protection fault [1]. Before fixing the root cause, error out when nesting happens and warn. [1] general protection fault, probably for non-canonical address 0xdead000000000d90: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 1083 Comm: kworker/1:9 Tainted: G W 6.9.0-rc6-custom-gd9b4f1cca7fb #7 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:mlxsw_sp_acl_erp_bf_insert+0x25/0x80 [...] Call Trace: mlxsw_sp_acl_atcam_entry_add+0x256/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370 worker_thread+0x2cb/0x3e0 kthread+0xd0/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation") Reported-by: Alexander Zubkov Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- lib/objagg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/objagg.c b/lib/objagg.c index 955538c90223..0f99ea5f5371 100644 --- a/lib/objagg.c +++ b/lib/objagg.c @@ -167,6 +167,9 @@ static int objagg_obj_parent_assign(struct objagg *objagg, { void *delta_priv; + if (WARN_ON(!objagg_obj_is_root(parent))) + return -EINVAL; + delta_priv = objagg->ops->delta_create(objagg->priv, parent->obj, objagg_obj->obj); if (IS_ERR(delta_priv)) From patchwork Thu Jun 6 14:49:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688630 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2050.outbound.protection.outlook.com [40.107.220.50]) (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 E6B8F19A28F for ; Thu, 6 Jun 2024 14:52:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685576; cv=fail; b=WayuKUPy6FBW41LyQGumSmhQBv/22oPbZcr4B/2zgZxIyynWqEvSpom+hHdFHD3CvY4soe0lE0T8/7+3dzG+Jo5AE3QmJ+TNRQDId1yIec4bm2CtlTTEfGo6Qae440rCaEmiKR8Fz2sGQV9qj3vJv3BAdfZ2mKWRbHi2aMvV1Ag= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685576; c=relaxed/simple; bh=1Ot6dEpZuJPzibSExxFVosMv5G8JiuvW+qDwkHP8zSM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m0bR7ZbyrHsp+E5DsCUf8B25gBWeU5v73m+dkAvKwhq8vlpGA7kAk7PVOOkOnFI4W6MgLMSLrnEfevYWk3cXIUc3B0Yq/nA/Ityc5N5+1tORYJ8u1vXHf+XMneZg7ybMIdxS304C+jNZRW/8f+mCuXdnjGCLjDYK+yylZ1pjgA4= 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=MM+CG1hr; arc=fail smtp.client-ip=40.107.220.50 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="MM+CG1hr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W7AIFhJjGveDTd1dzuDqdZdX37xIIwrHM+CM0VM1x/da6zx4NhooecNA5lPKpZEVQ1dHsE/I8fsiDes2NJDaA9Mzgm+8QNCWRS4CAyPNkNotQd+scbjiONquZCpK79EqK2U2crW3X8em78IRC3PL/NmLBQrv+NmbYilKZwai7VO7vbKuyEKJB7zRGv13YeMMDLAAV3kQM9ts87uP/RY1x8MJ6crEYKmj5yWE5q7gvCgKmzXnJuXCVnR5pRTQHhuCpGl35CjrwWQdY/76RO52QyrNTmYlg3WPD65f1buswWBcgaCZ5Mq83p1Jtmi/19IMPm7lxwz08DZ1D8HoyXWVNQ== 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=S7AaCTwVGE5lr6hgNG2Py+t/1f29/Om6SOuA4dEMY6I=; b=bCbWgfcqgajZc7bDQIgBQqAIXa4lnmGeJD+NN8rJPkLzviToyELCy63bytj1a0iPYfeZ11touvzEP/CeZ+NfTGzmzmLwuB0KIF1bEBfl3QrpSlk6/RtLZKZVot/QCbY+5PqmRgQ5tFwGopy1XV5klb4knpjujJ42orp3YnrxX3CimkkbAuUlaFyy9TXdWOpdg6lZeB8zSTJ8quibLWThoSQWKIL0HkfwIKJBKTTApZDXIXPkpf2uDw6SWxSUUHLtifOkRuMH3KX8LW53VNPc5m9Qdl5tlMpqsw6yca61WxTE7Q2bkT8rJb1k+Q5EnpY9fY2N65MuZ+MchVHLLZg4ew== 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=S7AaCTwVGE5lr6hgNG2Py+t/1f29/Om6SOuA4dEMY6I=; b=MM+CG1hrEqzKbykCpcqXQxxbAcG/HD05d52IrTnW8j7X5ExRebel2yK/ocvIzSWTpCxURCiriJoWoIrT5VPiS5QXTpkwjhJRv7cN9lrOYUxYsnJOYNopidzb5J7dLERSipe7pi9HSEqT0SF1c8z0Z0hnwygbu9TGZl44dbGS34Ld3PaeN6emaFx0ItbjlJqZPdXn6u51c4mwZCz3lyRMzL3ywrjuD7z01HOYzrzHSCPfNUUvGiXbXYziMpU/HaMhSBLB4KbXMe9xBEWsaLhpN3XtsYQ0m9KKDBWvSwyWByYIVthyP9TKdXdmvep5AvuQ95dVUcrJIk/DxHfGhCPq3w== Received: from PH0PR07CA0052.namprd07.prod.outlook.com (2603:10b6:510:e::27) by DS7PR12MB5910.namprd12.prod.outlook.com (2603:10b6:8:7b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.33; Thu, 6 Jun 2024 14:52:51 +0000 Received: from SN1PEPF000252A0.namprd05.prod.outlook.com (2603:10b6:510:e:cafe::1c) by PH0PR07CA0052.outlook.office365.com (2603:10b6:510:e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.20 via Frontend Transport; Thu, 6 Jun 2024 14:52:51 +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 SN1PEPF000252A0.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 14:52:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Thu, 6 Jun 2024 07:52:30 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:25 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 5/6] mlxsw: spectrum_acl_erp: Fix object nesting warning Date: Thu, 6 Jun 2024 16:49:42 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: SN1PEPF000252A0:EE_|DS7PR12MB5910:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e38af9d-0e71-4a82-cf9f-08dc86385692 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|376005|82310400017|1800799015; X-Microsoft-Antispam-Message-Info: cFADqFbTnHPmDPMyldrCP2VEllaswXAFn7BZptPtosSY7mWfehIVHQ1Fv6TadRnaXr1ruFYDb1E38tl9U77i5e/ZgL6PQtOWsSUxg/KEvWMGR3bqgUYrw9b7CxsXiMOGwxtyFoCtfj7dHhHzkU/Mn9sEvFPp62pCXjGvA/Fdy6XlQ/Uz8AFVaBFv1kzyPaEKzu+EkM8/8oT1Nr1VpF8VD77ZDeRpEWHU0wn+M5ukEaRYTsEvvUos0q7gLTpqR4isqZUbf4ARRZ5lCni6MIp8FfdFj8qDilAIsFJRAjgdBbQ+JNP/3S/IS+rLh5DnXjDSJ52CTtafi+k2DNcb5jySPL1MtevLL2EcHftKgZa430+exwCcJ1vqL7+P4UvODaRPC3sQOt+E0nxNoH4cSEbR0hGcR/oAK7AwSnrGXN9mBislwx2/PYgyHgbAcio5EPEMYGYb/6y5HLeld8eimsaD28k6GCMyi0691z6IHANiaLUoFfIJF3Y9/WShlmWpVhUAn9wlW9qey5Zc/HRlUU6LG9o/ZwjcoICK0v7MWh0m0WmFLPnjyjTNlr1j5uu7BOADlKhqFSVKi34l/NjQfmqRx+VNPpwXJmeSFe4qcGvF3BZBXKhzhIlX5yHC7xhwahUCI2uo83OXYPoiC42CkE82r0GydWapzCF8qKrvHBR92AD38GGfeA+8Z5BPv111ELsnMxdu3x1z3g9IC1Yjg7hXtizwBC6rN+76wh/LGN5Kwwu5yba3ecYIhvPmhSnJ2jGPGv01YO4x2aKec2Tvg5vxyhwxsh1irzcpb2YS14oADRbTze0K0zFbbDrGjj3Suw7vrc3mJ8pfi1PwXpD3F2Xl+d12M6DQzFrJTnxB3wWvmBE0BmzAQzrcjLqA2yMeDNMZcupItvmnbla5sZQUYmQJ8W2evdPDrg15/o5FYSU0p8T1WmDad83gNEww6sQGL8+Fs+GEHhD/DehU/L80HUr3fhiNEs6LvRq/+QC2XR8MSp7+9E3eZaWso2Lgb3GE+X9aVcD+gl0ZD6T892KtcnO5ao9DjHzKttfJN8R2ZTWl0wO2/J1KGWceDSUlwcl+jMM8yiFcp49GKq5m3T1Mu6OHbdPmJdA/3SJCYzT6OZ4s83oHHQ8+vw3OW8e5130U72o6hp13S2/q/z6m8QdGCBoiaDdlmgd40g+jcGq6J8Xnc6v6G66Acr5xsFGOs8uQVCUnAQJtc6D800vKbeW30MMwMZlZ9/fju+KgN0jaABpFwLDJcJuPe30rFwzdBmy4B8KLmKpi3QvLEUPjxPalT89JQKzq9fyZBlaJ8EqXYoAmvN/DGjAsf14jnoA3UHbcfUEn1/lAXihWTy2QmX5+dSC1xk+zDi/dso2QRrMvkvJjIOOm3a/+GILuGxUarmHjAtApLakkUcyOfLvYeMflheHFdQ== 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:(13230031)(36860700004)(376005)(82310400017)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:50.6957 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e38af9d-0e71-4a82-cf9f-08dc86385692 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: SN1PEPF000252A0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5910 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel ACLs in Spectrum-2 and newer ASICs can reside in the algorithmic TCAM (A-TCAM) or in the ordinary circuit TCAM (C-TCAM). The former can contain more ACLs (i.e., tc filters), but the number of masks in each region (i.e., tc chain) is limited. In order to mitigate the effects of the above limitation, the device allows filters to share a single mask if their masks only differ in up to 8 consecutive bits. For example, dst_ip/25 can be represented using dst_ip/24 with a delta of 1 bit. The C-TCAM does not have a limit on the number of masks being used (and therefore does not support mask aggregation), but can contain a limited number of filters. The driver uses the "objagg" library to perform the mask aggregation by passing it objects that consist of the filter's mask and whether the filter is to be inserted into the A-TCAM or the C-TCAM since filters in different TCAMs cannot share a mask. The set of created objects is dependent on the insertion order of the filters and is not necessarily optimal. Therefore, the driver will periodically ask the library to compute a more optimal set ("hints") by looking at all the existing objects. When the library asks the driver whether two objects can be aggregated the driver only compares the provided masks and ignores the A-TCAM / C-TCAM indication. This is the right thing to do since the goal is to move as many filters as possible to the A-TCAM. The driver also forbids two identical masks from being aggregated since this can only happen if one was intentionally put in the C-TCAM to avoid a conflict in the A-TCAM. The above can result in the following set of hints: H1: {mask X, A-TCAM} -> H2: {mask Y, A-TCAM} // X is Y + delta H3: {mask Y, C-TCAM} -> H4: {mask Z, A-TCAM} // Y is Z + delta After getting the hints from the library the driver will start migrating filters from one region to another while consulting the computed hints and instructing the device to perform a lookup in both regions during the transition. Assuming a filter with mask X is being migrated into the A-TCAM in the new region, the hints lookup will return H1. Since H2 is the parent of H1, the library will try to find the object associated with it and create it if necessary in which case another hints lookup (recursive) will be performed. This hints lookup for {mask Y, A-TCAM} will either return H2 or H3 since the driver passes the library an object comparison function that ignores the A-TCAM / C-TCAM indication. This can eventually lead to nested objects which are not supported by the library [1]. Fix by removing the object comparison function from both the driver and the library as the driver was the only user. That way the lookup will only return exact matches. I do not have a reliable reproducer that can reproduce the issue in a timely manner, but before the fix the issue would reproduce in several minutes and with the fix it does not reproduce in over an hour. Note that the current usefulness of the hints is limited because they include the C-TCAM indication and represent aggregation that cannot actually happen. This will be addressed in net-next. [1] WARNING: CPU: 0 PID: 153 at lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0 Modules linked in: CPU: 0 PID: 153 Comm: kworker/0:18 Not tainted 6.9.0-rc6-custom-g70fbc2c1c38b #42 Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:objagg_obj_parent_assign+0xb5/0xd0 [...] Call Trace: __objagg_obj_get+0x2bb/0x580 objagg_obj_get+0xe/0x80 mlxsw_sp_acl_erp_mask_get+0xb5/0xf0 mlxsw_sp_acl_atcam_entry_add+0xe8/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370 Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- .../ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 13 ------------- include/linux/objagg.h | 1 - lib/objagg.c | 15 --------------- 3 files changed, 29 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c index d231f4d2888b..9eee229303cc 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c @@ -1217,18 +1217,6 @@ static bool mlxsw_sp_acl_erp_delta_check(void *priv, const void *parent_obj, return err ? false : true; } -static int mlxsw_sp_acl_erp_hints_obj_cmp(const void *obj1, const void *obj2) -{ - const struct mlxsw_sp_acl_erp_key *key1 = obj1; - const struct mlxsw_sp_acl_erp_key *key2 = obj2; - - /* For hints purposes, two objects are considered equal - * in case the masks are the same. Does not matter what - * the "ctcam" value is. - */ - return memcmp(key1->mask, key2->mask, sizeof(key1->mask)); -} - static void *mlxsw_sp_acl_erp_delta_create(void *priv, void *parent_obj, void *obj) { @@ -1308,7 +1296,6 @@ static void mlxsw_sp_acl_erp_root_destroy(void *priv, void *root_priv) static const struct objagg_ops mlxsw_sp_acl_erp_objagg_ops = { .obj_size = sizeof(struct mlxsw_sp_acl_erp_key), .delta_check = mlxsw_sp_acl_erp_delta_check, - .hints_obj_cmp = mlxsw_sp_acl_erp_hints_obj_cmp, .delta_create = mlxsw_sp_acl_erp_delta_create, .delta_destroy = mlxsw_sp_acl_erp_delta_destroy, .root_create = mlxsw_sp_acl_erp_root_create, diff --git a/include/linux/objagg.h b/include/linux/objagg.h index 78021777df46..6df5b887dc54 100644 --- a/include/linux/objagg.h +++ b/include/linux/objagg.h @@ -8,7 +8,6 @@ struct objagg_ops { size_t obj_size; bool (*delta_check)(void *priv, const void *parent_obj, const void *obj); - int (*hints_obj_cmp)(const void *obj1, const void *obj2); void * (*delta_create)(void *priv, void *parent_obj, void *obj); void (*delta_destroy)(void *priv, void *delta_priv); void * (*root_create)(void *priv, void *obj, unsigned int root_id); diff --git a/lib/objagg.c b/lib/objagg.c index 0f99ea5f5371..363e43e849ac 100644 --- a/lib/objagg.c +++ b/lib/objagg.c @@ -906,20 +906,6 @@ static const struct objagg_opt_algo *objagg_opt_algos[] = { [OBJAGG_OPT_ALGO_SIMPLE_GREEDY] = &objagg_opt_simple_greedy, }; -static int objagg_hints_obj_cmp(struct rhashtable_compare_arg *arg, - const void *obj) -{ - struct rhashtable *ht = arg->ht; - struct objagg_hints *objagg_hints = - container_of(ht, struct objagg_hints, node_ht); - const struct objagg_ops *ops = objagg_hints->ops; - const char *ptr = obj; - - ptr += ht->p.key_offset; - return ops->hints_obj_cmp ? ops->hints_obj_cmp(ptr, arg->key) : - memcmp(ptr, arg->key, ht->p.key_len); -} - /** * objagg_hints_get - obtains hints instance * @objagg: objagg instance @@ -958,7 +944,6 @@ struct objagg_hints *objagg_hints_get(struct objagg *objagg, offsetof(struct objagg_hints_node, obj); objagg_hints->ht_params.head_offset = offsetof(struct objagg_hints_node, ht_node); - objagg_hints->ht_params.obj_cmpfn = objagg_hints_obj_cmp; err = rhashtable_init(&objagg_hints->node_ht, &objagg_hints->ht_params); if (err) From patchwork Thu Jun 6 14:49:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13688631 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2047.outbound.protection.outlook.com [40.107.244.47]) (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 F36D01A3BCB for ; Thu, 6 Jun 2024 14:52:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685579; cv=fail; b=JwdlBmiZoVEY2O1uwMpiypWcy27DG0282BSnuiFZfnGBun/tIkTaT3BP2P49WQ1dhSQHnzTUBpLzy9oxCUnHtgSdqzrn8D0KnaOISkHida4vyXRy41pxkSgiCeiItH1EqPwF1JLKh/yCRIjvX9pde2ziZce35NwnoK98jUF8Jis= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717685579; c=relaxed/simple; bh=JVUozyMqXjuV2jd0QiHCt7tQ6pG7ivNpWwBxEnoWOEU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RIirgtPSeAq2gx9DZlBqev3d0kw3b99dTOw2apDr7woCPJwWqOrPYC657ogIIezcxyhpQ6cxNvW5gT0b2QGylodT9aF1T0NYcsqHPIkrrmKSZqNL+4s01PlkjFOUgOZmu/v1ydItToTflmpJSMA0U35EXDONoH208bLrUNoXqNY= 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=uaoKeRpI; arc=fail smtp.client-ip=40.107.244.47 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="uaoKeRpI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HbB/drG2q3gZicz66NAaVq8zShHOcJsXhDg2q4rlpqpX74u6pM/B9ZHTP7KVtiEeGaeRJMNdQ8PDM6QZCLwIUXh5dAtp4jkxEXAdrM47EqWCqwKBu3l7IZOcQUVs+BpZGnYdxfSVi8h6UFvxm2yaYGrOnsecXf1wroaolIZBM1hb6HvDjB2Hxj2VdkjjkZcClhP7+cyTVc3ewez9Sd9hRYo6QU2jzeK8Le/W5AJeJb9WPv7zqzSRdr+yxaAq+UYlKI23AzpGuJTGU2Z/nPZ3ZXYLMd5+A334reAoY1uUKRFD04vEFb2Oyc0RT6GvzM6pb7O1TN2hANJ8+pX9fW40eg== 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=HK+qnbULRo5YM+LmSoO38zzTl+sSsSUdFhR/rF0v81I=; b=IPWsRx+Wjei6wMOAL8JHvoYVVkuxc2/w+0JRlBC+mfDnCkO1HRGZihpg6r7mPN2rVinlauZgetGZMDhYjxLmsHc2RtVL8GFXdF8oHJ7Y3bA8Qn0PQtdXUs6CeQoGiPpdWPr7ysIzFOpby1bQXfezWHqW7BRFgD2ER4PLvN9yVrYFa6UDmuufUS/YsE40TDlHxw8ndDSnncgjQJAyUxGp3vuxObHmD6v50w7m/AwIv7rDDqO04I+AyUTMNsDZgudIglIf4S0N9y0PH6e/4Ed3ANNX0USj6LoK24Z9WVksxfs765SegfdfLFHm2NZrQObc/1jY423VRlh6GFP9i9g2CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=HK+qnbULRo5YM+LmSoO38zzTl+sSsSUdFhR/rF0v81I=; b=uaoKeRpIrBTh26ps0xsbA6DD7UVq95muGkEgjF8UditwmGiaZquBDnPg0p8SfcrApuabxuZQQ7kD1rp4FYycopchM08iwS+syTlTg/E3L2hbBo9bWEHrLZGBHaO3i/j02rnY3w6q6IBc8KsQyutUTEWUYtHwesXr7RmknFe9S98wOmRfGnRLGYLrx8/6QGBJafpCO+kGvqer2vaI/flTHSg9BsvPNmNXS8xTO6kYacuB1bvqmoQujW+VGdwpvi4JjS9g/w81zbfu9E6N8+OQCyvZ0gEId3puXIZB1cOENz+prdnSCBj8mOg/q5joz/88z1oxTn06ICIAdMSp0OxXzQ== Received: from MN2PR13CA0005.namprd13.prod.outlook.com (2603:10b6:208:160::18) by MN2PR12MB4142.namprd12.prod.outlook.com (2603:10b6:208:1dd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Thu, 6 Jun 2024 14:52:54 +0000 Received: from BN3PEPF0000B36D.namprd21.prod.outlook.com (2603:10b6:208:160:cafe::30) by MN2PR13CA0005.outlook.office365.com (2603:10b6:208:160::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.12 via Frontend Transport; Thu, 6 Jun 2024 14:52:54 +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 BN3PEPF0000B36D.mail.protection.outlook.com (10.167.243.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.0 via Frontend Transport; Thu, 6 Jun 2024 14:52:53 +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.1544.4; Thu, 6 Jun 2024 07:52:35 -0700 Received: from localhost.localdomain (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.1544.4; Thu, 6 Jun 2024 07:52:30 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , "Petr Machata" , Jiri Pirko , Alexander Zubkov , Subject: [PATCH net 6/6] mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors Date: Thu, 6 Jun 2024 16:49:43 +0200 Message-ID: <94b8fd1b4c4db16c7df0bb5ecdba731b1d45d4c5.1717684365.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: BN3PEPF0000B36D:EE_|MN2PR12MB4142:EE_ X-MS-Office365-Filtering-Correlation-Id: 41dcff01-20fb-4316-8f35-08dc86385881 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|1800799015|376005|36860700004; X-Microsoft-Antispam-Message-Info: MwSP6E4NidgfGM9Y4mbRocHMOXYDMq2lJbSpqFOS1VQbNAeAe0IPBwB1K3zxHdBIZrijPuDWUfArcQOhfV7+6RikeCngoahO8MmEjwZmlL9COYfVpxeV3TxFzJ3CIBdl1aQy8YCFmHyOxSETXSAJKw+hzS2T//t/10/U4GH7f3TfmJBJ3xbSgORlX3pZt7/aZw8jMOVHkXxQEWHcRkIzHJXZVP0n2rcfMZbSq6ynVqPKpWQRyLvUK3GPDQLnQbAZmvfOa1Lu5SphSUG7o+ccjrL2Hzm1rUvU7p1Vw7/I0QeVdNVpDDOn9fecFv6pYIf1aSKwTYfEUd+4fcgqykq3MoQWK90bSYoRjI/5cM/GvmgcbIaRgzhE9trdFtOK3+95Tbh+gtpQfeBXmItKKgN9lstDC6qLzmelnpkxlVpQIXkC7BZQTxkGlp6khxDWfIfdc1yFYBlcRKad+MEOTkDmhq3IcMgIn7epq+UeMWFETDQWWpKQLORzEGR/LJVqQU8yL9hN8nRvRWSVIazqYckVbBFg8pt7pOzFq8xIA1JsT5JzYkTXCfTwPw7gVm6eBCbsZy83MfNDEU/u+RD1N+IlM1G6KKABcTicEL0KvLh9+Ob3g60VTLw/0COirV71x1aCjptHcTfItetX+ZDVo+hOe89im/HoKysfebY8gndd8r5LCLuPw8iDbPoJVIE4eHj5ZQFmR4EWwwTNRTQE8cTN2qPt7X15ydOE5VamcpWKBsJyK6ZcQ1wKhGiMA7Z6tyvzzvD8BE4mulf7hP0nt4dhbXunQfjpUu+JbGA7wXPAQDhXSjQ/T1L2xQ+5Uf5KVUzajCDefrjuVPr7E6oFUhY9Z0MaaACs7tmYruWemp86q6+u0CXq5FOTM9WKksriq+s1lPjT/3ueopZKq3ym5JeQFt9lt7g6d2oZYISe+K7UvSi6GP01NpZ5EA/NmG4hrPpb7fxsUG0PLSdE6LDnEdRDp6Cll2JmPGrIiQjLGnZ1a/B39G79b0IvUV/SJ1ssK/amITtAD/KC4FuAF3qE4MxqWRIRkR0SHwSS4Io3CNF58N6FMxbWiqoocr5Z0pLB8O9Oem9BuWlDC0uyj11KI51E/nLlQEm7n/z2gWUVzo8UJDammTMCqIhAzpq/ucWLU6WZPgZzz3IO60/9SQVbQIFLZtBQRWhHl9oCByeMWva05heHbIdBN93fKxRMRQt0I9GLPlcN9egsur7tQ251j5wPdUTOHVS+Y4bTVPTuXnMNUgxuIMfU7dvQYh9WEbRtcyqgHIvp+HgBNEA1klXbNBhtiO9Pn6xJvRCQ61/ePryZciouNFRcXVTT1BSdpfE0mLzqF87tuS47+auae7BNJn1u6qAQXOb2NbJG81hOgA4IA6lPip946OhTqgs2gPda45NfiCELiNBnwDHILxGAgFVeGA== 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)(82310400017)(1800799015)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 14:52:53.9069 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41dcff01-20fb-4316-8f35-08dc86385881 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: BN3PEPF0000B36D.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4142 X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel ACLs that reside in the algorithmic TCAM (A-TCAM) in Spectrum-2 and newer ASICs can share the same mask if their masks only differ in up to 8 consecutive bits. For example, consider the following filters: # tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 192.0.2.0/24 action drop # tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 198.51.100.128/25 action drop The second filter can use the same mask as the first (dst_ip/24) with a delta of 1 bit. However, the above only works because the two filters have different values in the common unmasked part (dst_ip/24). When entries have the same value in the common unmasked part they create undesired collisions in the device since many entries now have the same key. This leads to firmware errors such as [1] and to a reduced scale. Fix by adjusting the hash table key to only include the value in the common unmasked part. That is, without including the delta bits. That way the driver will detect the collision during filter insertion and spill the filter into the circuit TCAM (C-TCAM). Add a test case that fails without the fix and adjust existing cases that check C-TCAM spillage according to the above limitation. [1] mlxsw_spectrum2 0000:06:00.0: EMAD reg access failed (tid=3379b18a00003394,reg_id=3027(ptce3),type=write,status=8(resource not available)) Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP") Reported-by: Alexander Zubkov Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman --- .../mellanox/mlxsw/spectrum_acl_atcam.c | 18 +++--- .../mlxsw/spectrum_acl_bloom_filter.c | 2 +- .../mellanox/mlxsw/spectrum_acl_tcam.h | 9 +-- .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 55 +++++++++++++++++-- 4 files changed, 63 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c index a7473e782b56..07cb1e26ca3e 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c @@ -391,7 +391,8 @@ mlxsw_sp_acl_atcam_region_entry_insert(struct mlxsw_sp *mlxsw_sp, if (err) return err; - lkey_id = aregion->ops->lkey_id_get(aregion, aentry->enc_key, erp_id); + lkey_id = aregion->ops->lkey_id_get(aregion, aentry->ht_key.enc_key, + erp_id); if (IS_ERR(lkey_id)) return PTR_ERR(lkey_id); aentry->lkey_id = lkey_id; @@ -399,7 +400,7 @@ mlxsw_sp_acl_atcam_region_entry_insert(struct mlxsw_sp *mlxsw_sp, kvdl_index = mlxsw_afa_block_first_kvdl_index(rulei->act_block); mlxsw_reg_ptce3_pack(ptce3_pl, true, MLXSW_REG_PTCE3_OP_WRITE_WRITE, priority, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value, @@ -428,7 +429,7 @@ mlxsw_sp_acl_atcam_region_entry_remove(struct mlxsw_sp *mlxsw_sp, mlxsw_reg_ptce3_pack(ptce3_pl, false, MLXSW_REG_PTCE3_OP_WRITE_WRITE, 0, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value, @@ -457,7 +458,7 @@ mlxsw_sp_acl_atcam_region_entry_action_replace(struct mlxsw_sp *mlxsw_sp, kvdl_index = mlxsw_afa_block_first_kvdl_index(rulei->act_block); mlxsw_reg_ptce3_pack(ptce3_pl, true, MLXSW_REG_PTCE3_OP_WRITE_UPDATE, priority, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value, @@ -480,15 +481,13 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp, int err; mlxsw_afk_encode(afk, region->key_info, &rulei->values, - aentry->ht_key.full_enc_key, mask); + aentry->ht_key.enc_key, mask); erp_mask = mlxsw_sp_acl_erp_mask_get(aregion, mask, false); if (IS_ERR(erp_mask)) return PTR_ERR(erp_mask); aentry->erp_mask = erp_mask; aentry->ht_key.erp_id = mlxsw_sp_acl_erp_mask_erp_id(erp_mask); - memcpy(aentry->enc_key, aentry->ht_key.full_enc_key, - sizeof(aentry->enc_key)); /* Compute all needed delta information and clear the delta bits * from the encoded key. @@ -497,9 +496,8 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp, aentry->delta_info.start = mlxsw_sp_acl_erp_delta_start(delta); aentry->delta_info.mask = mlxsw_sp_acl_erp_delta_mask(delta); aentry->delta_info.value = - mlxsw_sp_acl_erp_delta_value(delta, - aentry->ht_key.full_enc_key); - mlxsw_sp_acl_erp_delta_clear(delta, aentry->enc_key); + mlxsw_sp_acl_erp_delta_value(delta, aentry->ht_key.enc_key); + mlxsw_sp_acl_erp_delta_clear(delta, aentry->ht_key.enc_key); /* Add rule to the list of A-TCAM rules, assuming this * rule is intended to A-TCAM. In case this rule does diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c index 95f63fcf4ba1..a54eedb69a3f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c @@ -249,7 +249,7 @@ __mlxsw_sp_acl_bf_key_encode(struct mlxsw_sp_acl_atcam_region *aregion, memcpy(chunk + pad_bytes, &erp_region_id, sizeof(erp_region_id)); memcpy(chunk + key_offset, - &aentry->enc_key[chunk_key_offsets[chunk_index]], + &aentry->ht_key.enc_key[chunk_key_offsets[chunk_index]], chunk_key_len); chunk += chunk_len; } diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h index 79a1d8606512..010204f73ea4 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h @@ -167,9 +167,9 @@ struct mlxsw_sp_acl_atcam_region { }; struct mlxsw_sp_acl_atcam_entry_ht_key { - char full_enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN]; /* Encoded - * key. - */ + char enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN]; /* Encoded key, minus + * delta bits. + */ u8 erp_id; }; @@ -181,9 +181,6 @@ struct mlxsw_sp_acl_atcam_entry { struct rhash_head ht_node; struct list_head list; /* Member in entries_list */ struct mlxsw_sp_acl_atcam_entry_ht_key ht_key; - char enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN]; /* Encoded key, - * minus delta bits. - */ struct { u16 start; u8 mask; diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh index 31252bc8775e..4994bea5daf8 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh @@ -11,7 +11,7 @@ ALL_TESTS="single_mask_test identical_filters_test two_masks_test \ multiple_masks_test ctcam_edge_cases_test delta_simple_test \ delta_two_masks_one_key_test delta_simple_rehash_test \ bloom_simple_test bloom_complex_test bloom_delta_test \ - max_erp_entries_test max_group_size_test" + max_erp_entries_test max_group_size_test collision_test" NUM_NETIFS=2 source $lib_dir/lib.sh source $lib_dir/tc_common.sh @@ -457,7 +457,7 @@ delta_two_masks_one_key_test() { # If 2 keys are the same and only differ in mask in a way that # they belong under the same ERP (second is delta of the first), - # there should be no C-TCAM spill. + # there should be C-TCAM spill. RET=0 @@ -474,8 +474,8 @@ delta_two_masks_one_key_test() tp_record "mlxsw:*" "tc filter add dev $h2 ingress protocol ip \ pref 2 handle 102 flower $tcflags dst_ip 192.0.2.2 \ action drop" - tp_check_hits "mlxsw:mlxsw_sp_acl_atcam_entry_add_ctcam_spill" 0 - check_err $? "incorrect C-TCAM spill while inserting the second rule" + tp_check_hits "mlxsw:mlxsw_sp_acl_atcam_entry_add_ctcam_spill" 1 + check_err $? "C-TCAM spill did not happen while inserting the second rule" $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q @@ -1087,6 +1087,53 @@ max_group_size_test() log_test "max ACL group size test ($tcflags). max size $max_size" } +collision_test() +{ + # Filters cannot share an eRP if in the common unmasked part (i.e., + # without the delta bits) they have the same values. If the driver does + # not prevent such configuration (by spilling into the C-TCAM), then + # multiple entries will be present in the device with the same key, + # leading to collisions and a reduced scale. + # + # Create such a scenario and make sure all the filters are successfully + # added. + + RET=0 + + local ret + + if [[ "$tcflags" != "skip_sw" ]]; then + return 0; + fi + + # Add a single dst_ip/24 filter and multiple dst_ip/32 filters that all + # have the same values in the common unmasked part (dst_ip/24). + + tc filter add dev $h2 ingress pref 1 proto ipv4 handle 101 \ + flower $tcflags dst_ip 198.51.100.0/24 \ + action drop + + for i in {0..255}; do + tc filter add dev $h2 ingress pref 2 proto ipv4 \ + handle $((102 + i)) \ + flower $tcflags dst_ip 198.51.100.${i}/32 \ + action drop + ret=$? + [[ $ret -ne 0 ]] && break + done + + check_err $ret "failed to add all the filters" + + for i in {255..0}; do + tc filter del dev $h2 ingress pref 2 proto ipv4 \ + handle $((102 + i)) flower + done + + tc filter del dev $h2 ingress pref 1 proto ipv4 handle 101 flower + + log_test "collision test ($tcflags)" +} + setup_prepare() { h1=${NETIFS[p1]}