From patchwork Fri May 31 16:50:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13681922 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2043.outbound.protection.outlook.com [40.107.22.43]) (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 3CD041C687; Fri, 31 May 2024 16:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717174239; cv=fail; b=fjF+MkYl9hdMvCay3rpHJeKKPw0vaBHJvOp0iHAD07EVVMvLG/eBOm0HENMRgiZlpm70rzQHzTNCwICmuLlC0zVIRdfHxjnL7+uzFa7YGl44rfSPtqGTYO04mJBcILFchoWB41ZSzP7uwi+NS99Q/L/jzDSdpMHqYMQT4sHSZgM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717174239; c=relaxed/simple; bh=cHqBg6hWQKOySEXBv5lcXJweofoYbEd+6+VX2m7w1nc=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=IMx/zTcezW8/KG73myE0gLbJ5vZkbSEhO+GceCVIoP7x4mRaZjwHSsbjoUVXDWhKO1Mq+2rNLxov8JhIL4IibaJIqyvcQszuWJcv+KASfh2e0SsMihosC5r/uhJIJjyMaA1N9VvYIsF02wtxJdoDqdgsR/W1frmZv7Hl1RssdBQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=U86mv36y; arc=fail smtp.client-ip=40.107.22.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="U86mv36y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l1/kDEUnkRZO4eEPxMKdUSkw1J3CRS/nYxqxDdYIiQVq8/N+eUhqAohab8E2xYitpm7ob0/8Y/+tmL6Abwh91yTDA4U7A97ULaXs81KyVR/5+Q21ABThv8idHhxdYlRn/HMTArnanFve+bawCjlzam8EE/cGp3cbhC9zY2jnYxdbOWaYADeYsES/Yx6AAbZkKX+KvYWF5PwTF506MOHqdF+mPK7rc5k/0QEnjC29tg3WXYlES7mC1kC6jdG39YLJ2q6jnxhXFvi7ExcvLbhZ7W+ITa0Cd2M8Kb12QBMaUtAmtJ+ZJJ/meSFj8w7OVYr/iKWldhrvRnjW42hzjAG5yQ== 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=tyu4oeEpKkyQ816PSY5tP0r6R0eqz5kVRRMc/XNd4yI=; b=jneeIOpcYlHmpLS1nk1g515Vjbp4mm2hEMb0fyjj2ShxxF7/edwR/NuLxKnIsf8/5o0Nno0Fd15egntyLMuVbVX9K+BhpCbodqRV+7vLY/i57YKv1FdifHjrGpXtAdPoOGCs4m+ywjQRL/Mhs+8vqaYh6K9l4HwAKnNfKVsQrrFdPUxwiMdgdIbteCDurMCLFHwm2pLTRBZIJAAezUzwaUDhP0GHVS0B1s+dVeeMDnDLKf8LW30a6WWl74smLMTCcX313uC0I2Qy0e8Zw/gG+gEuo0SzQPKfylv1AMEagb+ZKTZdOKV7XBaD00mn94owFtUWUW3QI/csZsE9VMNwhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tyu4oeEpKkyQ816PSY5tP0r6R0eqz5kVRRMc/XNd4yI=; b=U86mv36yz6lW2tQz56RtLwu8z6retQvFiCHFEirs4NPiG6yGQLJqhm85QEO2S+l8b/rRGLAe4Pt3KvB/mSTQUxpftG0D0Ocx8NvhhqNf/hhG821tnfUuI0MyaYsLAjLryRWynTjAqRs2R66su/iaTfAAlqqCSNCvzbcDGOF1a/k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4555.eurprd04.prod.outlook.com (2603:10a6:5:33::26) by AM8PR04MB7233.eurprd04.prod.outlook.com (2603:10a6:20b:1df::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Fri, 31 May 2024 16:50:34 +0000 Received: from DB7PR04MB4555.eurprd04.prod.outlook.com ([fe80::86ff:def:c14a:a72a]) by DB7PR04MB4555.eurprd04.prod.outlook.com ([fe80::86ff:def:c14a:a72a%7]) with mapi id 15.20.7611.030; Fri, 31 May 2024 16:50:34 +0000 From: Vladimir Oltean To: stable@vger.kernel.org, Sasha Levin , Greg Kroah-Hartman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Subject: [PATCH stable-5.15.y 0/2] Fix PTP received on wrong port with bridged SJA1105 DSA Date: Fri, 31 May 2024 19:50:14 +0300 Message-Id: <20240531165016.3021154-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: VI1PR10CA0093.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:28::22) To DB7PR04MB4555.eurprd04.prod.outlook.com (2603:10a6:5:33::26) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4555:EE_|AM8PR04MB7233:EE_ X-MS-Office365-Filtering-Correlation-Id: ad6041f0-d9c9-4541-a968-08dc8191ca07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|52116005|7416005|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: pACoEiqkh/0ry5DHYnyPybnsLkZJdp44qn3aDW/pCNDDhGC5vp8p4btGX/Gs317ocw3PR8CAAhbIj1Rfl+/u/V90DEFOWxSmIth8u0qTWzb2MQxvflUdhKpTRwcJiiKU4oBqBWs8CFNkCFXjlfRjEPAhB2o5wOrFKL63r0BDUPtdsARyEnlWRayeEg4HZIK7T8vJai3NkaciLZUc1RDzj5oUDrJhPfrJ0+Z5zLNEHb7PTXAQrJWuHTUcT27w5SFk14/NKW4PAPEjjBMEEGYcdx0C2/TZsntWOXCI2AYq3QO1uaRWVR/pqz/J00Cx1F1vXunHnnk8zh1nOXNHlR6Nz7foLhz9hULHKhdOaV0fXkKZYZsosKdO7Zj+CwKIruwbLic+WOQ7qMBokBMsACbAwcHX2tp/0iZjEiAm9sL8bXKrv8MmWxSbLdngYDboDHYrFHkuKT04G0jGbAWvBKB2ApaKEIETK+y5p9ck45OkjZ9yRx9n+RF1oT14c0eeIndt9r+LwAKDJhubJHj5fDjTsIj/wMs0xsLWLD9OnDqLrf+S3NAEn3OlnojZTqs0BRfKxFZn5MTIOTZZuyeT5dshuyu8gibAYtKuyIFE/FNWwLVOCQDIHL0fJz4YaS+JqkBU23dB+A3hl0l0MYwTpkKuayrIZ9mTCejbr+zDcz/80US5rKHKHB87WqkKfweasv586CrjQ/rUBoqyG+MF5VmIOnHBRY7hg6Zv56yZ5fF/4mWevwkeEljj2YZqehbupB+pOuL66hh+WXl5KBWgUT7KHkEyIObUixOCb07YWnQwbAjRpeh6Mp+l0rV9ZrtH/hIC9DPvfLpSUqTt3a30ZfP4Oo6ufvdWCyHctOSvqKhJGW4VOBk2lBFPNJ4OIMPR1w9qinB3pILotml0sVBrTCMEdfo5rDw4jc1xG0F8dHGdPbhBZVpjupOMpdoXqzeEYPkWlxzffHa6eK/ULprJhpYAoBqi4cf9644ntQkxTUdifjqAYFMB09/7OHZmdXlj8w8jKPBym9efKq0ONmIm2TDeAdzPMm7zguXxT+QZ7HcunvzUr+Y0H5hI/7uq/jZUq/3cPssuijgBNIiiBb6GjG88B4/Azg+1XV3ic5IZ/dnnY2xo8WtvyEsnwfsbUh2zVfZlP/rPsUTaCPU4kSI6itFPYNajT1kWkOpKNY45emTRqQNf4df9b9jaNLVKr/gGMFivgh0XcqAxto1+YZ2JTHQNqeD4yfnKQ1vBeSBENO7jrxckS5hhz4jjnroJ3UFqBJz8lDIxRFVa9avhegR8Wu8Q5g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4555.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(52116005)(7416005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X2vFEZxStmGFyHEGz37FHs1uLCX1B2FP3tmoX0b2bvuIL58P9pwG9TZDd57sgYyB6Aaoq3XMBRzVCFnyWzHIM83gsvLBQJFDj7OwWhkbGQDQ/FiDW5LYpP1WXF18ex2JXzSQdi2SrUnTwTeJW74ugQNjlFbBFyLA5zJdlUZHA7UNKmw/Bs2RO0QjGUn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FDQ4THoX540Q9LFAwaLFd+OOUbMp0ORaPP5nHY28I5zm0aMX4IZPemPXdR7A1Y5zzSmYUKm4fqCaPQ+ghQzXtFgxXhp2gGXA/woFZBqnF7+BnMDEPowxwj3gNnh8qtrvPINNkF8OIwm5I8Ei6UKlEnqqTHlr9UPEmYRB70Q3e8YqWMX315GGmH8my5YhonM6826q9+ekpqS3y3FUPT+JJRmlGtMEBgBCAeirShbxcwvobRzVjUxL5k3Wti+bSXZ7HqXxXi7OF5vF8sSh2/+QXN0EZjkLWv5hKFqztRjyHIqLmVWtBAPoVGuvEmSAzkPzu8+yg0zQciewWFwesbJB25yhroQ8Nw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad6041f0-d9c9-4541-a968-08dc8191ca07 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4555.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 16:50:34.1756 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HCa6BKhBVL0AmHP/uTwOV+btQ0Bopt3a67rinmEc2cVz6yMr4RPH0MKMOr/dxTK6ydKlkocPIOeu5g+eYFR4vQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7233 It has been brought to my attention that what had been fixed 1 year ago here for kernels 5.18 and later: https://lore.kernel.org/netdev/20230626155112.3155993-1-vladimir.oltean@nxp.com/ is still broken on linux-5.15.y. Short summary: PTP boundary clock is broken for ports under a VLAN-aware bridge. The reason is that the Fixes: tags in those patches were wrong. The issue originated from earlier, but the changes from 5.18 (blamed there), aka DSA FDB isolation, masked that. A straightforward cherry-pick was not possible, due to the conflict with the aforementioned DSA FDB isolation work from 5.18. So I redid patch 2/2 and marked what I had to adapt. Tested on the NXP LS1021A-TSN board. Vladimir Oltean (2): net: dsa: sja1105: always enable the INCL_SRCPT option net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT drivers/net/dsa/sja1105/sja1105_main.c | 9 ++----- net/dsa/tag_sja1105.c | 34 ++++++++++++++++++++------ 2 files changed, 28 insertions(+), 15 deletions(-) --- I'm sorry for the people who will want to backport DSA FDB isolation to linux-5.15.y :(