[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b428f0f0-d194-4f93-affd-dae34d0c86f1@linux.dev>
Date: Thu, 13 Nov 2025 16:48:00 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Andrew Lunn <andrew@...n.ch>
Cc: "Russell King (Oracle)" <linux@...linux.org.uk>,
Andrew Lunn <andrew+netdev@...n.ch>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Heiner Kallweit <hkallweit1@...il.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrei Botila <andrei.botila@....nxp.com>,
Richard Cochran <richardcochran@...il.com>, Simon Horman <horms@...nel.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Jacob Keller <jacob.e.keller@...el.com>,
Kory Maincent <kory.maincent@...tlin.com>,
bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/9] phy: add hwtstamp_get callback to phy
drivers
On 13/11/2025 13:36, Andrew Lunn wrote:
>> I was planning to remove SIOCSHWTSTAMP/SIOCGHWTSTAMP dev_eth_ioctl calls
>> later once everything has landed and we have tests confirming that ioctl
>> and netlink interfaces work exactly the same way.
>
> I don't think you can remove SIOCSHWTSTAMP, it is ABI. All you can
> really do is change the implementation so that it uses the same path
> as the netlink code.
Probably wrong explanation from my side. The plan is not to remove ABI,
but to let it go through netlink path in the core. As you suggest.
> You can avoid this for _get by never adding it in the first
> place. Only support the netlink API for PHYs.
Andrew, could you please check if I understand things correctly. PHY
devices are not exposed to user-space directly, and thus cannot be
configured via ioctl without netdev's .ndo_eth_ioctl(). The core netdev
part falls back to ioctl for SIOCSHWTSTAMP/SIOCGHWTSTAMP only in case
when there is no ndo_hwtstamp_get/ndo_hwtstamp_set implemented in
network device driver. Once all network drivers are converted, there
will be no way user-space SIOCSHWTSTAMP/SIOCGHWTSTAMP ABI can reach
phy_mii_ioctl().
If the above is correct, then yes, there is no reason to implement
SIOCGHWTSTAMP, and even more, SIOCSHWTSTAMP can be technically removed
as a dead code.
Powered by blists - more mailing lists