Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C37BEC74A5B for ; Wed, 8 Mar 2023 23:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbjCHXFC (ORCPT ); Wed, 8 Mar 2023 18:05:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjCHXEh (ORCPT ); Wed, 8 Mar 2023 18:04:37 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2043.outbound.protection.outlook.com [40.107.7.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C01FBD4607; Wed, 8 Mar 2023 15:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ecrLBOV1DbAOyeLEm5bUTImg5Juz07Dfuex+gGPoAl4puG8ehnWFuae3hcd0ueE9hdGGxX6WFnr9t07ThcKpvrtyPFpyxu8enbFBDDxExAq0ujwEQYokXq1dohkQ0j5z2ziDUOilieXVPDW85MJEgALQBcWlA/+3+d/fqXDcSIJLHX7BKOBGLqQBlNE5GhEhbzPbZOjICrJo0wqFW+Tui/IkmmG4Gq6Q65yQk/PBNvoNlCHXimJ8bcET64zQiXuJXe94BmjqcMmetsJjsISKKqrmKfP7xjB11Cdb1855qbC2inaie6+kf34chuFakQ/jL06jKARf/32k/PBHrtv4/Q== 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=K3XYVHWXpBZxYeOC8I2IP1AmFgW1RKgDGv1y9ioZYW8=; b=S7sPMkgErxdf653TCCtb6mIfvOumRTuPBwbS5GWCveiDNMDvUq8dls+wAhKNdm0HzysUkJ1Ly8hb1nGioIJN1aIc71f7XhbBhiGN8+8fhiey14Q4I47jxqg4rP8Dx/Xds9tLMiMPhOBsuFWLT8CJksToCScdl+tm9h0aNKjggAy6h1xbnd1BjF8eTlGZHPJYnVUSPIxOkfVFcFLlIihIpWK0Bj0jqMlSMqDVqnJ/bv7L9Dq4f6zC2+3I1Sz2r4eASLv2JZD/cMNN5YlAXZbUxpOZNhApaR/5v/raEgX2DpKjPgESNzMp0QxjZU6Z9KdI1JJ3RrYuCkOEHqHuOTllmQ== 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=K3XYVHWXpBZxYeOC8I2IP1AmFgW1RKgDGv1y9ioZYW8=; b=L29OjOxyxRE4f9vDWkt+oYT7LBCZ6xELkBfAlh9x1BjVPIx/+9Qwni1WGZsIC5mHMUDcsoZzJQL4VSwCIycsvn12iLItnu4IL+fQYCT5/cZyegIHdP89pA0tiVlHwepgDZC9o3MELeZEgUvd/nKBCSgAh7PzZCWOINscHsEaErM= 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 VI1PR04MB6783.eurprd04.prod.outlook.com (2603:10a6:803:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17; Wed, 8 Mar 2023 23:03:26 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8%7]) with mapi id 15.20.6178.017; Wed, 8 Mar 2023 23:03:26 +0000 Date: Thu, 9 Mar 2023 01:03:21 +0200 From: Vladimir Oltean To: =?utf-8?B?S8O2cnk=?= Maincent Cc: Andrew Lunn , Florian Fainelli , Heiner Kallweit , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-omap@vger.kernel.org, Michael Walle , Maxime Chevallier , Richard Cochran , thomas.petazzoni@bootlin.com, Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Minghao Chi , Jie Wang , Oleksij Rempel , Sean Anderson , "Gustavo A. R. Silva" , Wolfram Sang , Alexander Lobakin , Marco Bonelli Subject: Re: [PATCH v3 3/5] net: Let the active time stamping layer be selectable. Message-ID: <20230308230321.liw3v255okrhxg6s@skbuf> References: <20230308135936.761794-1-kory.maincent@bootlin.com> <20230308135936.761794-1-kory.maincent@bootlin.com> <20230308135936.761794-4-kory.maincent@bootlin.com> <20230308135936.761794-4-kory.maincent@bootlin.com> Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230308135936.761794-4-kory.maincent@bootlin.com> <20230308135936.761794-4-kory.maincent@bootlin.com> X-ClientProxiedBy: BE1P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:79::15) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|VI1PR04MB6783:EE_ X-MS-Office365-Filtering-Correlation-Id: 01c2af35-6109-41a4-404d-08db20295323 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VcA+VPibUrnxSeUW7OxcyQVHL45dtPlxOxR6fjbj4HtOznxDZwem2hyjCoU4mNHFehxit+mHCS5MYkEIdS9CY530BQW6qaKXNFUYK3cV+RxWvQsqlMnhm3bosYrnMSkPNovbET/P9SN6rvJtHuGXbMlG1MBWuXSUDbSRghAi8AcijZwyoaVzXxc7zdCfEvLIXJ1VXLZJxnDBQuCDzdSjG+s0FOuzvXkTEhXgr8AvkGcdJTwfG9aM3je0HJ/iUIDnM4USI2ozvy8kPzBNbrFfzg/0b/J1sYeWZLIu8V6VqpPoPG1OsKGxi/CUsGpm7NoXVzoFCm5DA6WxhmdyN/WsPivPBZ+w3OPz+r6CHDEgHD5U7Ay2o4jra+jsoiLEVnZk1Ky0vREi1EwggDdrwAda5PpA4jO4OqrcDqjBALrUa8/kDxphWPmqcGM++C6/31EyBEDV5gUmEbpKEzSgGHB+XEseK+247kKpRKaJLTaPJDvnxxLe6C0i/LtznCyzn8vnEPzQHvGywXId0HSTSF+SAebhvB0ZBncnW18g1gGQhn4qy6LoT4ZnSa/WAafxZCXak2iEmBR4NY2VAa1L+BLpWWXx5ZHz4EmBJXh25dtwNN/j5lfdfoXoKzr0C1/eI/AUmi86kGRB+Zz5qqFXOoUz5A== 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:(13230025)(4636009)(7916004)(366004)(39860400002)(376002)(396003)(346002)(136003)(451199018)(83380400001)(66574015)(6506007)(1076003)(26005)(41300700001)(186003)(478600001)(6486002)(6666004)(6512007)(6916009)(66476007)(66556008)(86362001)(8676002)(4326008)(8936002)(2906002)(66946007)(7406005)(7416002)(9686003)(5660300002)(44832011)(38100700002)(316002)(54906003)(33716001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?I3i57d201tTOHT0YPU1kVqchozqhvNyTTTPbdDiw7uqUkMVa+TZek5wwfq?= =?iso-8859-1?Q?EE+h+4UKkVXeSNM/4zuV3Ou7RCLL1GNM30+qBmZ8W+eZ3Lm8LP26YP9zen?= =?iso-8859-1?Q?haV4qk1RezRxnrQJGkh6Ru4VN4L7cG2kz5damZeYLNpUwFnGuafVHr7gF7?= =?iso-8859-1?Q?Y37HMfG+zKt//VIUJ5dj5J8QG4/UcDrZ9wUmg7YEAS1tUtrMHKuYWdk8Pb?= =?iso-8859-1?Q?H3zXTFPjrIXcBrXQLYUr0KjMHbs7mZlx1lgfoQkR+wNOw+L0IrcLC5xSVJ?= =?iso-8859-1?Q?XCgcY3WRHo+Av4seRG6AsWnjmh3MIIvghmqMT8SotafFguNUo0URC4sG0A?= =?iso-8859-1?Q?scPefOUaMJ9DaR9D+UMtt14LHNnkNAIsIqpNHYFFbANb0iJebsgAoVWYyl?= =?iso-8859-1?Q?5tV1FKXrJ4VbGRyb465gv2U9jizb5Y8h1ct8JaMrOFPLAdfYT1s/7x1c36?= =?iso-8859-1?Q?ebOK71X4kDaFKKg7Or+fVudZC6BY8xQ/OJMrmth2cR48YH0TvNemXUA6Cn?= =?iso-8859-1?Q?I7Nex4gM/rcdF3KqZxGKT2iwDw6za3FkbfOfM0pYRHQC0WZ+nzn9zTrgKH?= =?iso-8859-1?Q?BjXaUkiBJ47n3v5GBk1m0ghIEq1loBPhD1HC58rP4vBQV1qgwJ3UgxKrO7?= =?iso-8859-1?Q?rsODmiE6xwjODTvEFGZohcw6paiLVeOhbRhowYj5NVyKYvXe2xCQMzfapX?= =?iso-8859-1?Q?czCiWiPZm2QIVWP03XpO4nGOJA8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MXa87tKsSq64ElRCuLBpCQEmF42SVst3yAjqnREa+g7C8lzozCXRXiOw?= =?iso-8859-1?Q?=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01c2af35-6109-41a4-404d-08db20295323 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 23:03:26.5967 (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: DxQyCSHtvNDmnJnn0xaRCPIXmReLzKhjuW9NVS8cqMEkRLXR5mW4yZA2yhbF8CkEKd4Z5njp9qal5lSzLEvM7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6783 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (trimmed CC list of bouncing email addresses) On Wed, Mar 08, 2023 at 02:59:27PM +0100, K?ry Maincent wrote: > +void of_set_timestamp(struct net_device *netdev, struct phy_device *phydev) > +{ > + struct device_node *node = phydev->mdio.dev.of_node; > + const struct ethtool_ops *ops = netdev->ethtool_ops; > + const char *s; > + enum timestamping_layer ts_layer = 0; > + > + if (phy_has_hwtstamp(phydev)) > + ts_layer = PHY_TIMESTAMPING; > + else if (ops->get_ts_info) > + ts_layer = MAC_TIMESTAMPING; > + > + if (of_property_read_string(node, "preferred-timestamp", &s)) > + goto out; > + > + if (!s) > + goto out; > + > + if (phy_has_hwtstamp(phydev) && !strcmp(s, "phy")) > + ts_layer = PHY_TIMESTAMPING; > + > + if (ops->get_ts_info && !strcmp(s, "mac")) > + ts_layer = MAC_TIMESTAMPING; > + > +out: > + netdev->selected_timestamping_layer = ts_layer; > +} From previous discussions, I believe that a device tree property was added in order to prevent perceived performance regressions when timestamping support is added to a PHY driver, correct? I have a dumb question: if updating the device trees is needed in order to prevent these behavior changes, then how is the regression problem addressed for those device trees which don't contain this new property (all device trees)?