Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1048446rwp; Thu, 13 Jul 2023 05:31:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJQU/fXm1c1jL+xqsi5E8n+DWfyLFR5BkTHrmHPrfFrb8HxjyEkiotqx7JRDH+7iHkhmk6 X-Received: by 2002:a17:906:51c3:b0:974:1e0e:91ee with SMTP id v3-20020a17090651c300b009741e0e91eemr1413173ejk.13.1689251467743; Thu, 13 Jul 2023 05:31:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689251467; cv=pass; d=google.com; s=arc-20160816; b=bnCnv71lnCXXr7kdyyAkdesUnfzIlrdJs+ZYJLiRcAgkZ11NqnvWGOQlWOPq0fIbbH RjQCWVLdabxDvT4e0cNhsbfPH62N+JrsujYokjF3nZrVrFD1hWcd8N5Uv9N7T4QYgA54 VdEjTbTMWSVvXDGVn3bUqfx9Um7IurTMro82lyoPTX+kk5Bk2ZCaiv9BS4qbNYOdI7Px Wbg9IE3kpaK8F94JbA32GtfsRU6aEVp2ZW2Oiyrt+lwM/P5PcMz87atfHn7szbvtIlD5 BG7Ay1Y2m/Ra0hL86z5IIQYJorfryQY7r+PaLIKHkpTfO0s0jRk0Xg3SrA7MSnj8RiZe bBCw== 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=eIdP5O4JigGuuPyoOYxAGk4KKsGKBGJHukSXxI6GkxU=; fh=FsMQszZnVnFY8qNtbSjbSaNEHoVHbK+Q/xK98QB7OPs=; b=bKUA14dMgiHieCmz5ysrVjb8A6Bw/bUwc29eeU7bX3d1nk7tTk/RqQRitx8ymvOOes YSDLIBN1fxr53eY4DKmHp78xyLVFMxlfXMdyLI/jKoW0QF295sAM6fT6T4kXi/DNqz9P CNxN2Iq2MfIWz+X2Eix+63QPF7hPoHocvsNIJ/o1YioZIaI4fgJzC0XXgRdItc5l9Iyx Af5SnutdLD/ubQ1ZpZfrqoyhfZW3ov9odLwEK+CLSKPkdjPxSx+VAVuJPV4gAS7Bef8i sFZDjJj7dAr61Y1VaBYS8FM7+g2eIuGPxMPKfSH1ObSVqbC1WTA5tSgF+10dX+YRPObw vcnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=E80aB2RO; 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 f4-20020a17090624c400b00991e6951c1bsi6872077ejb.423.2023.07.13.05.30.42; Thu, 13 Jul 2023 05:31:07 -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=E80aB2RO; 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 S234677AbjGMMTm (ORCPT + 99 others); Thu, 13 Jul 2023 08:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234663AbjGMMTi (ORCPT ); Thu, 13 Jul 2023 08:19:38 -0400 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2075.outbound.protection.outlook.com [40.107.14.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A302706; Thu, 13 Jul 2023 05:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROCa0DarMt3sv8UUjrTGWWrTN1olq0X6150GwQiKsn0RpMpo4l2UR9OQtZfqt6iARsgFXsWsX/7uwSf7YjqDThI+mLOVmGdqhv9rh6GSUQ3Am2ahzXoLjSb1meiTdoy+p27XboeIDxlMaW1ndjDXFSxZlOPJrhnF9bHcqKpw481TF+M+j06rxLcWCOK71iq1gRAJXhO4dRkDLFotpr1WWyiFxWPmkL/cS98R7WNWTOGcIQMhIhgKN5SoD0Gk2uczJzxU204JEq0IV6+NyQDWt3V/7St6vvAGaPOK9fa0d6kKmLrfRix2ugRsvWWw1Aw98nvb20BQLAxP5FNu+kd0QQ== 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=eIdP5O4JigGuuPyoOYxAGk4KKsGKBGJHukSXxI6GkxU=; b=FrfTDi6vNS0ieTAPg2938HmiqkAIC5r074RdEkORDNy6Zuv662eixtI8T3GYljRyATPREiXXIci3Y15M3+FmLo24EzJWZBT0kzGwBXCFr8YE2rNFswZtIPpZzTJQb/JK5kgNA0KTZ5CLN4/dFNfZ7xNK/NmQNMdbWXOh/w7ZYYZ4R20Ps/Dy4j3l/UvnZHfwGC0OH+l9Uc9Em1naq0oILztAFv0vT0ZJAsKbBxWFV1BFjK0X6V+o5K0CzFiRqDbmpB171jYJoQ4q1khJQq83LDMgbfPM+y6IccScBaBhnkRLn/JJClgQwGwmq2ab+tPZWWptfWrPM1c62NPTbCPvtQ== 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=eIdP5O4JigGuuPyoOYxAGk4KKsGKBGJHukSXxI6GkxU=; b=E80aB2ROItEkpLtShuNr1VNcRmd/ZA92cKj2pU806ijNVKw3GlUcAdzRlxOr7QWXaaly1MzjGUOki9gK4UfxAPeDss6iYZvUhqx3HQpgscT5dIHDEsa+rq2vcpRCuOMM+xY9TcHZZXxXQFvDsZk0GSdNQYEpm3ceAaIN++KaNfM= 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 DB8PR04MB6971.eurprd04.prod.outlook.com (2603:10a6:10:113::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 12:19:30 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::cc2a:5d80:9dbd:d850]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::cc2a:5d80:9dbd:d850%7]) with mapi id 15.20.6588.017; Thu, 13 Jul 2023 12:19:29 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , Maxim Georgiev , Horatiu Vultur , =?UTF-8?q?K=C3=B6ry=20Maincent?= , Maxime Chevallier , Richard Cochran , Vadim Fedorenko , Gerhard Engleder , Hangbin Liu , Russell King , Heiner Kallweit , Jacob Keller , Jay Vosburgh , Andy Gospodarek , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , UNGLinuxDriver@microchip.com, Lars Povlsen , Steen Hegelund , Daniel Machon , Simon Horman , Casper Andersson , Sergey Organov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 net-next 00/10] Introduce ndo_hwtstamp_get() and ndo_hwtstamp_set() Date: Thu, 13 Jul 2023 15:18:57 +0300 Message-Id: <20230713121907.3249291-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0157.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:99::18) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DB8PR04MB6971:EE_ X-MS-Office365-Filtering-Correlation-Id: dce14071-d807-4a0b-6cd7-08db839b6864 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wws0bIpOCWnvsCbRydkhqJFRSgUqbJMzVBVOqybZDvJBrEiPUwYA7cpthEJddp50ncQH8DI29FDvjiTj3aQ/JraXx121e9rtrr9jpL9E8Wb/INYPuBQJPFw/puDLKJ7ew5gsGFjCPFi7HOcWXCeREvYo/H7dTuAmZnZBy5vU1vmR/7DF67+/vF2Seie4oaNdqHI4vT/W9xOAze5mEd5pgVzdRvFR7seV8TcdXnYFDtV9APSQ4mJFGcupyaLazD74wkkkyJLrfNiQT800fsMEUE+zo9iYBlUpdbXafEhmoPa2xjnQvqr6QGcYP8SsFYeZTWfvhz5ZRieA/9BxCcqiNLejslvDJZo6x72/ZUDtawdw49PjC+MLU1o/LEdFVlrLfY2FVZqQeAjRLqsHW2LxIwA/S0Emg181FpgEBqvHV4xb+gzdf6rMm6D9giwQH3rfIp6UJWEBA4diByUp21CTovdr2fYixA6Y0/UArH89fCDSLO82algpTET2VUhm+X56Spajr1+uD5BiIAvWWS7cAJCRq/G0vNSnjfAXv6i3YMZr//MAyVoAAP6yxxsShJ3dtewScss107OZ7dZ97Ikqxcb5LP2nTkQfcHVWCyvDSXgEydtMMvV2NwFEohWpGVasgItj1f5c126narrrZT8pDw== 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)(346002)(396003)(136003)(366004)(39860400002)(376002)(451199021)(54906003)(316002)(6666004)(52116002)(186003)(66946007)(6916009)(4326008)(6486002)(66556008)(66476007)(478600001)(966005)(41300700001)(6512007)(8676002)(8936002)(7416002)(86362001)(1076003)(6506007)(26005)(5660300002)(44832011)(83380400001)(2616005)(36756003)(66574015)(2906002)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S0xxZm9SbmJpdmVNNmduRlNTcVh6bk55WkxqaGo2SDhYMDZpaGhXT0pOSDBE?= =?utf-8?B?VEp2aW1pVW9tTFZKUDBveThjenlyY3V1cjNaRldrTU12dDNTREtJV3VqdHBJ?= =?utf-8?B?VDZ2dWNsNlNIdHUrdDV6TFV6dVY1VTVuMXo0MEo5dk1paGtzT1d1ZDlncklP?= =?utf-8?B?cXZSdWpXYnZQTEg0RDVrQWJBY3pHYk1nNHhUTTFiQndYdTZpTnNmV0NqNnVM?= =?utf-8?B?T1BGemNyVy83UWxvZDUyNE1ZeFhjcGlVdnlkZm5JREYrajR6UVF1Y2FHMndB?= =?utf-8?B?RitNYXdKVTF4aUpwcmlnOEJsUm9JVTdNa3prbjFzbDRqOTBKVS9Fam9lZlNh?= =?utf-8?B?S3QrZk1MQko2WDlkUFVPWlE4S0oxdENjakY2WHZGak5PZH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rossTenant-Network-Message-Id: dce14071-d807-4a0b-6cd7-08db839b6864 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 12:19:29.9316 (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: x4G1CqvrOFY0Ryq6u7JTpQltPRXD+kOZUCBIFEWUrxW5bCRxOBow4JTjw78AZU4TV1I2pM7pTxUqCoxx4M7hhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6971 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_BLOCKED, 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 Based on previous RFCs from Maxim Georgiev: https://lore.kernel.org/netdev/20230502043150.17097-1-glipus@gmail.com/ this series attempts to introduce new API for the hardware timestamping control path (SIOCGHWTSTAMP and SIOCSHWTSTAMP handling). I don't have any board with phylib hardware timestamping, so I would appreciate testing (especially on lan966x, the most intricate conversion). I was, however, able to test netdev level timestamping, because I also have some more unsubmitted conversions in progress: https://github.com/vladimiroltean/linux/commits/ndo-hwtstamp-v7 I hope that the concerns expressed in the comments of previous series were addressed, and that Köry Maincent's series: https://lore.kernel.org/netdev/20230406173308.401924-1-kory.maincent@bootlin.com/ can make progress in parallel with the conversion of the rest of drivers. Maxim Georgiev (5): net: add NDOs for configuring hardware timestamping net: add hwtstamping helpers for stackable net devices net: vlan: convert to ndo_hwtstamp_get() / ndo_hwtstamp_set() net: macvlan: convert to ndo_hwtstamp_get() / ndo_hwtstamp_set() net: bonding: convert to ndo_hwtstamp_get() / ndo_hwtstamp_set() Vladimir Oltean (5): net: fec: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() net: fec: delete fec_ptp_disable_hwts() net: sparx5: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() net: lan966x: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() net: remove phy_has_hwtstamp() -> phy_mii_ioctl() decision from converted drivers drivers/net/bonding/bond_main.c | 105 ++++++---- drivers/net/ethernet/freescale/fec.h | 6 +- drivers/net/ethernet/freescale/fec_main.c | 41 ++-- drivers/net/ethernet/freescale/fec_ptp.c | 43 ++-- .../ethernet/microchip/lan966x/lan966x_main.c | 61 ++++-- .../ethernet/microchip/lan966x/lan966x_main.h | 12 +- .../ethernet/microchip/lan966x/lan966x_ptp.c | 34 ++-- .../ethernet/microchip/sparx5/sparx5_main.h | 9 +- .../ethernet/microchip/sparx5/sparx5_netdev.c | 35 +++- .../ethernet/microchip/sparx5/sparx5_ptp.c | 24 ++- drivers/net/macvlan.c | 34 ++-- include/linux/net_tstamp.h | 28 +++ include/linux/netdevice.h | 25 +++ net/8021q/vlan_dev.c | 27 ++- net/core/dev_ioctl.c | 183 +++++++++++++++++- 15 files changed, 480 insertions(+), 187 deletions(-) -- 2.34.1