From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.196.61 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796407711; b=uH4gi28v8TvUl1QHmwNWo1Pp/jDbmaIHdyPfQVvHEXa71xXSzznW5lt2uXymDjwzjdRE 3T5/dQ7F5j7ck38SrNnP2WJ+bIgvr3ARZ2Dm62jXEuVIXleIA+F67lkQrKf2RJXsbOGPU ZOBrBERmq7R+FMj52wKROEOP8ZVizPk7hyR1hRlJC7S+GlH5LuUJrH4eL0r5kgM51TKqq t1yNmq4PbP+eG4nr+ys7jZajzdH6FZAWX+PeByA0on95aHIfV1ZEwHKZJoHX23fPjWuMt rMSeHCc7HhDtQlKs4hRCdfCzsnX7Wlt5A4EH4eOoDYS3KxgboJyZEQ+QuXrh56fd5iA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796407711; h=DMARC-Filter:DKIM-Signature:Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=f0bzKt0mgYVVOKUT+lo2M7ckPyarxsohYAO4sEEDwbc=; b=te4cYhXmQOTnkU9//tB80sa/RCHMqAIJtC9lgtTmR5uS/LSIRBIGvEwaJuLJ07brGzCQ TWk/iFrix3jgTIVD2ijzrx0UWa8Vrif4BExwJzJLgb01I36KYHrDa8f+nQSNmasXcJhzY 4zaJn/Y0c9ZI2e+W1VlJshuuetwwlEr0OKmPq974gqAcAeFr5cKRhHwgQjnLKvGKg1RRM 2XgmSGtRMRQFyxcIyxht3CcSOGL5ryBXaNc5/vpZvGlZPTDCegLTDx2jTpzcqMchikMw+ hjjL1lN4/0MiA/OLbe+/CZm6poXT6dIMHJDemWgk6hCO/Zhjb+ATCkMkQJeNI+qC1nw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nokia.com; spf=fail smtp.mailfrom=nokia.com; dkim=pass header.d=nokia.com header.i=@nokia.com header.a=rsa-sha256 header.s=selector1 header.b=sbZrnCFH; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.196.61 Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazon11013061.outbound.protection.outlook.com [40.93.196.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8692F606A32F; Fri, 4 Dec 2026 18:08:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8692F606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nokia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=nokia.com header.i=@nokia.com header.a=rsa-sha256 header.s=selector1 header.b=sbZrnCFH ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SXMBVg0G7woRkpQBp7QLb/7my2HJ9Gy2RrAvVEVtA+2/KGSNvZMqbMNm3xYF8SVmAevJZ4Hhd59FgmgPGXOaPcnnalWdDaxggsBFrI3O7UBC3uL4AI+8IDr9VatGaty0/WTE/3tLZYfzkpMJbYlTTckigP4hNnCqDhXQGi2MZQ5+h6hcI+afhXPilDqKmeeLddg0SWxu572STPoDWcwniKt2x+MRXHsSvtAqtdrHpNDl1T1uafx5FivxrlWTxSb3LerSa7ekdfvyzK6TpTPUmYg/xD6U3qc83OmOeMhmwUPGPB9rWo4+ZMGh+hELMWAJOXqTOcbue76WjbNn8NFIwQ== 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=f0bzKt0mgYVVOKUT+lo2M7ckPyarxsohYAO4sEEDwbc=; b=swARUNgS7DKcO8YVrC44jm2HHQFqWFHJcu/vQrMS5Dn+YbN9+R2UL3dzH5pOMXZYFuVM4HOFcja/9QtJnWOHQHvSkN6Q/8i+Y0W5UiLtqI945NHo9qguPDlfVNQqsJ+WoYnw39lYgduY7q1TFmv1aVnGfGw4mLhxgfPdRKpjy8nbtgZKvXFSa5ISsDtYyXJB/oWge1iobEnKvZa41DFpGggNpUdsoYaGP2GCC3NREeQZ5Xxs5wrcDJ1y7onwzbe/QvjI6/2l2+N5AZBzjty3tkUtNbL5O9H/Xi/poO5N2X+BhV3YcE5wIzH0L+enSMdHSsyZt4HavwuKNl9FMrZ9LA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f0bzKt0mgYVVOKUT+lo2M7ckPyarxsohYAO4sEEDwbc=; b=sbZrnCFHWxZVRFNTuaySMVZ5sOBg7vLj14j+1+CPVgIduND6jyKtSZLuqBpLuFOKkNwsByY2fGpfrnXKNLfO3hJ4LG1qiHF1c/j6dLidjifVW6u97A4DH/9rhL/GJzY8W0Arc06qB7FhHdvd7z04T6OG6F3tvkQnojQMiKEXuBe8rTVMslkTDeN/LAF6gr/wtALILm2JP/KcrTctz+sincpKeWyxiaDMeheUyQWhKUjnNtIyaZ8OdbGC6wyuwRT3X7KqvL/gMO5ecBiff3RpbxQToOHwYC2f4JhK7syaLvOCXARetJd6TPi2ZNulqf0YBrCzwBP7t7DBfVLdjyWBMg== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com; Received: from BN0PR08MB6951.namprd08.prod.outlook.com (2603:10b6:408:128::14) by DM4PR08MB8193.namprd08.prod.outlook.com (2603:10b6:8:44::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.12; Fri, 4 Dec 2026 18:08:22 +0000 Received: from BN0PR08MB6951.namprd08.prod.outlook.com ([fe80::4dd1:e1e:56b0:b178]) by BN0PR08MB6951.namprd08.prod.outlook.com ([fe80::4dd1:e1e:56b0:b178%4]) with mapi id 15.21.0688.011; Fri, 4 Dec 2026 18:08:22 +0000 From: Anthony Pighin To: Vladimir Oltean Cc: Madalin Bucur , "Christophe Leroy (CS GROUP)" , Claudiu Manoil , Camelia Groza , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] soc: fsl: qbman: flush the private memory before enabling QMan and BMan Date: Fri, 4 Dec 2026 13:08:19 -0500 Message-ID: <20261204180819.2719449-1-anthony.pighin@nokia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CH0P221CA0024.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11c::20) To BN0PR08MB6951.namprd08.prod.outlook.com (2603:10b6:408:128::14) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN0PR08MB6951:EE_|DM4PR08MB8193:EE_ X-MS-Office365-Filtering-Correlation-Id: 715a69f8-a46c-4694-e76e-08df52319562 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|23010399003|1800799024|261026121527099003|11063799006|10067099003|5023799004|56012099006|261022075727099003|261021121427099003|261102123227099003|261028144727099003|261022105027099003|261026140227099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: KDrWpUVdykwU3bGYg0hmrWKv/fFKHgPFPxbSv6H7zGvL8eXjF1UtpaOjxpkjfMG8yYggrblgswPLNCUmh/niB4fmQnv7VzenUjbuzKxysIa45zX6wH7wjhWfpOUcnKmGCtB34zCE/9OfgY+BsbDQbr7Y6MoaajrA3d1TRxc+FYtvi5fCPvi1J94P54Gpe3hvXrNDUpO0id5WUBUNQzSdMh6xNHKUzEuVvl4/FkuAArcu+BdVdFMraOxbKyJmMUg/QbNzVD3dtZRXAymiKaLTuMRDo234/PJQAKtkNQRzSl3LUUYWICxVrek+SNLXQHH/RCgstkk+b8/YuCnwEBH6Qd2VzC7CajQIII7NZcQay9JTfLdxA9N+kVrFnlZEDY5sR97x4SryeGlqtS43E0/MRbW+PfdiciRQtfLfgFOCLkajacDGdhcS+hfmMI2g6MzLnwQPoAUSSc9wLQFk56NhoRiS/61NnyEwM9h4YDr6BQjiGW76D4pB4nRqp0kajV2BmKCJp3JEEeFoblgjNvql5uohZ7ZPlQ3/g81zWAEy2ktzQP3Nw2BThQgRSYSN6EjKMr18tGlPelElOraMmRMUKw0QP1ZLtrmWwx73zVOlMhhc8tmilJbQJrz3z9ZaoR0QM9bMEBWMaABpEt4lKhfEJHFs4tkR0jeCJUKM/MQfAlw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR08MB6951.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(23010399003)(1800799024)(261026121527099003)(11063799006)(10067099003)(5023799004)(56012099006)(261022075727099003)(261021121427099003)(261102123227099003)(261028144727099003)(261022105027099003)(261026140227099003)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?NpD8CxL8V/pxFStECOY9YdFon6OmPGXHToYWNWbgX15FCQ0nE/VqQdlVGHE0?= =?us-ascii?Q?Fy21R5GjQ96+wIB1w38kSw55kHDL92g2fg4OPOhGQenE3D6si35KylfioAMM?= =?us-ascii?Q?gRwmSxAyLbcd22q737T4FeCCHp0FPp8hBdUIcwydVmw2rMYmb+YsD6CmjGKJ?= =?us-ascii?Q?6R6Sdooj4RQWM/qFRKAIE7sc+vGnWIc9B02iLO6skrMbCG7A/ZGaB4LVjqnJ?= =?us-ascii?Q?Nc46/VIX6fZ6bIa32I4WuOBASQqwOdZQlXsniz74yCD7QtmjMx/1rhUH5rM2?= =?us-ascii?Q?04dd7qqCi9HPglWCqtsx/N+jjnUY63zReWuFwQddx/gCuiiJAI7qsw3A6+1N?= =?us-ascii?Q?F6WNv8R1y5QsDUkJCvzuivR/pFciRIAJMC1DGp/IXIjXSUV2D3l0l++JYWsO?= =?us-ascii?Q?EFSsb9/8Y1CqSrKx+fSbyCPDcmut4jG/ZLnkTImMXFHijFnb/fJnkOQaYVey?= =?us-ascii?Q?UQ14LPcpLiQ5VcLSDVgyTYKZg5YinoRnLUtD04BUFJab7+Wjy0r3xARait8i?= =?us-ascii?Q?vAklX2Oz6D7aylyvFa85PmZidJWpoOEGLjIQkIqZfKJmFUXovB76KJVnm5h/?= =?us-ascii?Q?QMNj+Yx03vQ4vvE042rCz5lvsKq1xBaKEUIrahdZZbpZ+JsEDFOJLH55gYTE?= =?us-ascii?Q?vNTLiguu41OaDjMBQvq2hZmhN6i4TlSOW+WfnLt90yBGZxxtmwHMEnhPEaXT?= =?us-ascii?Q?5nAIqkmRA1QXcD7QTcC5TikLEn0kvBZZJhWdGKoR/ljs1ODkZzLmWCpb7GgM?= =?us-ascii?Q?qb3hElqTfaKwx1v1co90KxN884OgZaeJzOPMjUfniPjEZqpAiHP91KYhyLnq?= =?us-ascii?Q?AbjscwySUotue/Idsfg5hqrE2CFzGC28CVqbzN7MnONKuNzlNkBAr0ZFP0K9?= =?us-ascii?Q?1Zf0oj0KB5gQmUz1gjo0Dzl+xV067KXvBws8W1LaLoFzLqwO5Bg4FehD2WXh?= =?us-ascii?Q?i4Pf4o2WdCbsC88efC3Kss2NRYS+N84un2DcSJI+5talBJfHTi/egPHPosio?= =?us-ascii?Q?E//5O6EAf5NoQO+4eiLQV3UOTDzGesqvClpexh656o6qRQTI9tNmbE8hmF5g?= =?us-ascii?Q?c1G+ukKC4hXsQK5mHyloXeE4fVZbZjgJKlL/sORWZpPnugFCPvdoydwTrZaQ?= =?us-ascii?Q?s6vyIMF8hkxRIGzHex9smfoxkYoV8CEDUvRSveLNClFVPtOzAXlEl/fjIYte?= =?us-ascii?Q?rwxgHzKuvYVNz5T/L65uxYid6W5g5w/xK7LDnZ8pohdS7E49MCbaDB1MwMEu?= =?us-ascii?Q?QKaJ/RIb8zptQgf5tScdMvKOaXF12EDjs2iTTnfpXN6anwWfvHAXs6Xj7ZMG?= =?us-ascii?Q?Melg9k2y1qkw4LyNZoswOA9477PRPskk5NL4wEm+GkaYdAoclluBt9fIVcdu?= =?us-ascii?Q?S/bC1v71YHcTBxnQyse9nM0999lDkeYjTLC+3Gm0a8RTIJ823EOw1QHDiCpN?= =?us-ascii?Q?T8EsWwiyf4684f/EmV3mqN3PPzqw3kyTCMXDUF7mBZoxDqluiAYFVoq5BGCU?= =?us-ascii?Q?XOTTWMGjHfFgWVG8mqBCKzjkYrxAaf1H24PBc6h8R5ZAkNobecLZI2iTip+A?= =?us-ascii?Q?iIt0bNLZEW3hPuCw+Y0WBcqDZpiIxWp/UITBKbZSwOVVtIjzP2xq0tUXSbHY?= =?us-ascii?Q?f8X8m4rNd6dA87LERU2lfgIlrgz6wHi6NvHiPtPw2/AdO6Ftya1LsCb6jKZH?= =?us-ascii?Q?huMf8jZ+xmNv59Rb4A7FJVOiUNYcsDTmwBO0LzaZiT0L4eVar1q1UNuCt21H?= =?us-ascii?Q?tEcTlcQ6HQ=3D=3D?= X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 715a69f8-a46c-4694-e76e-08df52319562 X-MS-Exchange-CrossTenant-AuthSource: BN0PR08MB6951.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 18:08:22.5212 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CK3KfvlezBeKIz1LAbNU7Ej9BWC5eTEQ1YpqcAiDiNOcT+apkH6GnueAeKIacrzCKirzzf+NAkeYG6vLJfcGKQsxkxa8bXJ7AWxtvuIgax4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR08MB8193 Hi Vladimir, On Fri, Dec 04, 2026 at 07:06:03PM +0200, Vladimir Oltean wrote: > If I'm right it also means your patch does not fix the bug you're > actually trying to track down, correct? Correct. Thanks for pushing back on the FBPR theory. It was wrong, and your questions are what got us to the real bug. > There is clearly a misunderstanding here. I never said an all-zero frame > descriptor. I said the buffer address is zero. Understood, I misread you there. > I have a suspicion that your problem may be fixed by the patch below. > Please try. It is, and thanks for digging into bman_release() to find it. Your analysis showed exactly where to force the race, which is what made a reproducer possible. I tested on an LS1043A board running v6.18.62 with CONFIG_PREEMPT=y, where dpaa_bp_seed() runs during probe in udevd task context. First, without your patch, I added a debug hook to bman_release() just before the second get_affine_portal(), where bm_rcr_start() has already returned an entry but the portal is no longer held. The hook acts only on the first two releases from dpaa_bp_seed(). On the first release the hook migrated the task to another CPU. bman_release() filled the entry in the old CPU's RCR, then committed the current entry of the new CPU's RCR, which had never been written. bman-dbg: migrate udevd/125 cpu 3 -> 0 (now 0), ret 0 bman-dbg: pool 0 filled ffff800081225000 slot 0, committing ffff800080eb9000 slot 0 on cpu 0: bpid 0 bufs 0 0 0 0 0 0 0 0 On the second it made a nested bman_release() on the same portal, the case your commit message describes. The entry the outer call committed was all zeroes, as you expected. bman-dbg: pool 0 filled ffff800080eb9040 slot 1, committing ffff800080eb9080 slot 2 on cpu 0: bpid 0 bufs 0 0 0 0 0 0 0 0 That put 16 zero addresses into BPID 0, and FMan received 16 frames into them 1.5 s after link up. [ 25.765468] fsl_dpaa_mac 1ae4000.ethernet mgmt: Link is Up - 1Gbps/Full - flow control off [ 27.236335] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 ... 15 more identical lines With your patch, the hook at the same point found preemption and IRQs disabled and could not act. Each committed entry was the one just filled, there were no NULL buffers, and mgmt passed traffic normally. The footprint matches our field reports. Recent hits on v6.6.59 and v6.12.57 all come at boot, on mgmt, within a few seconds of link up, with real lengths and parse status. For example: [ 31.769753] fsl_dpaa_mac 1ae4000.ethernet mgmt: Link is Up - 1Gbps/Full - flow control off [ 32.939955] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 [ 32.939982] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 [ 32.939989] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 [ 32.939995] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 [ 32.940002] rx_default_dqrr(mgmt): NULL buffer! format=0, offset=256, length=1514, status=0x4 Those logs can't tell which of the two cases occurred. The migration case needs no second caller, only a preemption in the window. Nothing else releases buffers during probe on our board, so it is the likelier of the two. You may want to add it to your commit message. Tested-by: Anthony Pighin That leaves the QMan part of my patch, which you said you were already writing a fix for. Having the full PFDR fix in one commit from you may be the better approach. Or would you prefer a v2 from me with only the QMan change? Thanks, Anthony