Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16401218rwd; Mon, 26 Jun 2023 09:28:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hS7K2YKNWQgNrGujunfCj99SsAd6It0SNTDmW0YY4SqLAWBzAhMbD41c8vuWZXR3f8tkQ X-Received: by 2002:a17:907:2683:b0:975:63f4:46 with SMTP id bn3-20020a170907268300b0097563f40046mr24490276ejc.57.1687796922486; Mon, 26 Jun 2023 09:28:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687796922; cv=pass; d=google.com; s=arc-20160816; b=aBBex4xoLhYIhFmJpWmJI8vD8ZjfOBJEB3/6NDVCBtz9X11oI5Qxg02Yu8ozyBt/It GnMEXvQZmhA0d0riV3s9/KZmcMJD+E5vtBmwj+F5H/Gi68pDpnRXNUwRZN+0GPXaFCf2 Sic0xaP5CKsMgUmW33/V2Rij+WjbVz7SyWR+yrof2bkU4tPg3U2OmX62AQ3eLd0NCGRW g1CFgPlSiMtXLgvVcl7++VdQ1nt3iAEzZ/uvbVhxRorxpGcJxMW3sPX53yp7bfGaE+yO Jmi61yVkg5aqJMxmcroI4wsgEKGF1HyV1FIz/2Y/WL3tKyvqPUGoJTCrkH9f4/u8XU48 9E5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=XV1rDkwxV5MkbKlVUoEHnt4bioN45V9xSIYe8ApRGbg=; fh=iurQRswHi9hWiYvyPjsOpfQdagiAg7Zmv5exCLcOUfA=; b=YmaBxWkKlZTfkC0ONWyRulkQzvHaIz4+sqAP6KPkE5a/XdRWAU2sqCM0sn3WA4GnyD VXFksuzMl+r8+iX2wXF05kE/4iMRRjNe4p0bXI25nTsI9N+L8mv4UTlg25x+6khKdo1B 68L/az0mSU5GVWrfTQjxI8TG1S6CQ4xfePtEURIBMUhktpF1GYVlxERkvWu2N07oCshm pwSIZ4sp/i0FOn72i2gbGktGDVVhhkOz/ytiyeypwvpoKz4m/AZ1GnKe9E7eAkoh2ISj 7V4Y8o27qDjNDp2YvIJIvk1jA5FV+32A3ESUfRwKdC3n03a+0qIMVbiQJtn+sQ165EqV 9/Ew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fQTiz8Bn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca4-20020a170906a3c400b00988bab51330si2884505ejb.633.2023.06.26.09.28.17; Mon, 26 Jun 2023 09:28:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fQTiz8Bn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230174AbjFZPka (ORCPT + 99 others); Mon, 26 Jun 2023 11:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjFZPkY (ORCPT ); Mon, 26 Jun 2023 11:40:24 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2050.outbound.protection.outlook.com [40.107.7.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1932C10D9; Mon, 26 Jun 2023 08:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAddwFxdzVSD9qSeLPCfMOquEBzArrKcW7P8DoZRQKpSoYP5IVdBwEAvJD+Vh57N0qTK1FJF+JF6QfLN1fR3dY6IL6NiDt74jEPd4b7s+sz46ZVian8joCPjKONYfC0O/zSnbqZcFzUOTdU8gNeh7ebJUevM3rCYp6Xud/Wn7YzgbFIbwTc0Ne070JidRfiuVO/OZ/AgsFGWXdGqZbXE5o1F+Zr7/iT2KKYNVu1TsH+69wBzbFM8Ot3o5lWRTrtyPLHXnFLXs86RVL2gKzdxeHCzCQyShJGzIVBaz9WvoFCWXt/0CjjXH2iWjSrUf/q8KNNUaDKDHdbycqbVXroLNw== 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=XV1rDkwxV5MkbKlVUoEHnt4bioN45V9xSIYe8ApRGbg=; b=HhbyAtdN9wXKuWWkcVLmrOZNRj7N1HWuekGwD7BKTq2kOtel0nlRY4YrmPssAtmVmt+nSxfY/4rMrKb6WJ62x0uy01vk0qXnRuIlMn0/Rrh/0/2VOGiHLacezAWyO0THQPhahgHoXVeQoE7pkgGsqKcl5ga5/nJENu57UCYFLfR/x902GfIaf3f9tYYD0DlQuFp4KPQLHI0XjYlpC6gJ4Ril8qyUBBABjkCGz8+HFh1X3zTo0dP+yF+LrREcz7jHj8kkd2n+o/IZP+WecWaN1ODjtUHxCtKjDHqJ0F4CjTNFfR239Etmm/7p+Lafjmc5hAXGttKyKVoAcbLSYZ7Vcg== 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=XV1rDkwxV5MkbKlVUoEHnt4bioN45V9xSIYe8ApRGbg=; b=fQTiz8BnteDHwmmDALrATYM0bPg9PgQEDE+/7tjz9QCcq0XlWCagnS1xPG3WBzhlBsD6w59NKT/Ty73BJyW3bSYfXFXux4YFopNr91kga0UZhiLpXmVfWy84B/+evAQ1vLwdWjPv63grx8yZHMCraqE9YJxfKiRAT7rAQmwUlOA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by PAXPR04MB8638.eurprd04.prod.outlook.com (2603:10a6:102:21d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Mon, 26 Jun 2023 15:40:20 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460%5]) with mapi id 15.20.6521.026; Mon, 26 Jun 2023 15:40:19 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Xiaoliang Yang , Richard Cochran , Antoine Tenart , linux-kernel@vger.kernel.org Subject: [PATCH net 0/3] Fix PTP packet drops with ocelot-8021q DSA tag protocol Date: Mon, 26 Jun 2023 18:40:00 +0300 Message-Id: <20230626154003.3153076-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR10CA0121.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::38) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|PAXPR04MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: c49ccfe7-d7af-4032-a7db-08db765ba5a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e5gqKLQsUPIBzTH/YiDB0/Z6tJHxhlE2FoizTcn6Vw2UOgjZOahMlD9Q6fIpf9Vf1QTO1TovMe+ZxtGho97QFWXfVWgdHvEuBdTB0FafYCsecLay1EGtpLS9My0ACoc72WtvPPgV/CoJDWF1vvA/tUwiwkDAfvCZVa8yvk6s1ywSoW8LRmgyw7X0FnAWmoBgjAQK/kpvhQiwbP3b3Y3QPzNWk/75RIZl6CmYJzgSy4TgNp6vigPM4iDVkTlvVQ/A+wY2iF56vNuplF4HgRCkVkpRCmkQVIXOFh4WPUDlG4iaCZX2rea5+rQPWuNab/+vl0x6Qr5HwMzLea1iSmJiSFfGivfVWSwFUaJ7H3qSmLakFvHN9vFmw9+aR9XWyzdGZwqsvYIkH7FUz9U83mxy1MWuPsI6Xkn9XipeTGLNhjSpo80iNOvuRg2XEQ17U10tYfEWKJAlxeQdVEd27pD0oHi/V3LAowgVuAOw1zmOpJscKQIawUdqMCct6khjBox2sf8r4MmUfuLZ6Ry0hGD67rQ+hA0Tuj+39EH48e+P2TdbbkUowIjYckJ9u2oCK+BedCIsMTn1YX53D1buRxCgqbJzkrgQ2tDiIKBgAXqzLXchaUobx4Q7sfGQ7dDPIPKH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(39860400002)(376002)(346002)(396003)(451199021)(8676002)(66946007)(41300700001)(66476007)(316002)(66556008)(8936002)(4326008)(26005)(1076003)(6506007)(6512007)(186003)(6916009)(2616005)(54906003)(478600001)(6486002)(6666004)(52116002)(2906002)(5660300002)(7416002)(44832011)(38100700002)(38350700002)(36756003)(86362001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?heM4ee8N2Kb0SrqhOUN2eVU7TvZFKqMX3mwxDA7wqGita5lcwd0TL/2R70mp?= =?us-ascii?Q?mQb9aywS+o/zmeOjI7jp9pR/HtsDfotN8ASM5e1JqCa5Sa+CpwzzIou43Lq+?= =?us-ascii?Q?60WTa3Ofz+emWXE2ic9J5cpKRQpCel3bSiqstFfsZjIRWDJLTwOw4ftYsTqH?= =?us-ascii?Q?IhygPr7Sg/aiuaZDzWa+nhKYxMeXp0xbGEY0u8Acck02Bc49qbH7iflKRooT?= =?us-ascii?Q?GDTNNyY276pT5/MSdOkm2sNuuAU7qXRSu/w5zhWOOQNBRGAhk6nAbCJU342s?= =?us-ascii?Q?D/hTkcMgZMUCY4kaH0K/lDdDbhp+Frnw+XrthG6ylzQM9n7F/KDBbhVbxzl5?= =?us-ascii?Q?lX6nX3ftUW8+tagfq734gNhDHOadgpawcM+PAxyjY9avdbbM6YQcHcbdOq7g?= =?us-ascii?Q?xDh47CZJLZH6mlVlpJ0S5bPH8K1z94wZQEUAShzKo8QqRtmFIsmsrRA+w/kc?= =?us-ascii?Q?FOwDCT5dvrGALI8nmz0XSJowiplwVwfXH7kwMOBwkted19ht77do/AJfYR6A?= =?us-ascii?Q?wJvBNt2opG8S024GeJnFu25SJ/deaUWtizJNcEY8qMuGquA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p8QeMrE5irMQWUYGkUgBHO8Z29O+0xpygE/Vx5FngNsWCq5X?= =?us-ascii?Q?MgMK6usIVKacXnsSDlVq+RDuxZiemZYEmDobOENAGr0DkJnf7jJJAhEo2OdU?= =?us-ascii?Q?zNBZFAbmCQn0kdHFPKR8eoemR6sqV7uTAlxarIYA+O3dOt9pEUFM14lxRGuh?= =?us-ascii?Q?Aw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c49ccfe7-d7af-4032-a7db-08db765ba5a2 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 15:40:19.7806 (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: mZfDKvIkx8GtiN6AEjnqjsAdpn5R/qxwUwrHJkNlnOoGTQAVF/R55Qx4LaqbO77sqH3tQQ2lSUUOZ22ZPbX+yQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8638 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch 3/3 fixes an issue with the ocelot/felix driver, where it would drop PTP traffic on RX unless hardware timestamping was enabled. Fixing that requires the driver to know whether it had previously configured the hardware to timestamp PTP packets on that port. But it cannot correctly determine that today using the existing code structure, so patches 1/3 and 2/3 fix the control path of the code such that ocelot->ports[port]->ptp_rx_filter faithfully reflects whether that configuration took place. Vladimir Oltean (3): net: mscc: ocelot: don't report that RX timestamping is enabled by default net: mscc: ocelot: don't keep PTP configuration of all ports in single structure net: dsa: felix: don't drop PTP frames with tag_8021q when RX timestamping is disabled drivers/net/dsa/ocelot/felix.c | 3 +++ drivers/net/ethernet/mscc/ocelot.c | 1 - drivers/net/ethernet/mscc/ocelot_ptp.c | 35 +++++++++++++++----------- include/soc/mscc/ocelot.h | 5 ++-- 4 files changed, 25 insertions(+), 19 deletions(-) -- 2.34.1