From patchwork Mon Jul 17 15:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13316494 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 mail-he1eur04on062a.outbound.protection.outlook.com ([2a01:111:f400:fe0d::62a] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLQ8I-004NwG-34 for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 15:27:32 +0000 From: Vladimir Oltean Subject: [PATCH v8 net-next 00/12] Introduce ndo_hwtstamp_get() and ndo_hwtstamp_set() Date: Mon, 17 Jul 2023 18:26:57 +0300 Message-Id: <20230717152709.574773-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: 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_Maincent?= , 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 , Michal Kubecek , linux-arm-kernel@lists.infradead.org, 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 (7): 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: transfer rtnl_lock() requirement from ethtool_set_ethtool_phy_ops() to caller net: phy: provide phylib stubs for hardware timestamping operations 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 | 56 +++--- drivers/net/ethernet/freescale/fec_ptp.c | 43 ++-- .../ethernet/microchip/lan966x/lan966x_main.c | 58 +++--- .../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 ++-- drivers/net/phy/Makefile | 2 + drivers/net/phy/phy.c | 34 ++++ drivers/net/phy/phy_device.c | 26 ++- include/linux/net_tstamp.h | 30 +++ include/linux/netdevice.h | 25 +++ include/linux/phy.h | 7 + net/8021q/vlan_dev.c | 27 ++- net/core/dev_ioctl.c | 184 +++++++++++++++++- net/ethtool/common.c | 3 +- 20 files changed, 544 insertions(+), 210 deletions(-)