Re: [PATCH net-next v5 1/2] ptp: introduce Alibaba CIPU PHC driver
From: Wen Gu
Date: Fri Nov 28 2025 - 01:22:32 EST
On 2025/11/28 00:36, Jakub Kicinski wrote:
On Thu, 27 Nov 2025 13:48:47 +0800 Wen Gu wrote:
We can't delete existing drivers. It used to be far less annoying
until every cloud vendor under the sun decided to hack up their own
implementation of something as simple as the clock.
So what kind of drivers do you think are qualified to be placed in the
drivers/ptp? I checked some docs, e.g.[1], and codes in drivers/ptp,
but I am not sure what the deciding factor is, assuming that exposing
a PTP character device is not sufficient.
[1] https://docs.kernel.org/driver-api/ptp.html
Networking ones? I don't have a great answer. My point is basically
that we are networking maintainers. I have a good understanding of PTP
(the actual protocol) and TSN as these are networking technologies.
But I don't feel qualified to review purely time / clock related code.
I don't even know the UNIX/Linux clock API very well.
Searching the codebase for ptp_clock_register() shows that the PTP
implementations that related to the networking (IEEE 1588) are directly
embedded in the NIC drivers (drivers/net), e.g. ena_phc.c, ice_ptp.c,
igb_ptp.c, instead of being in drivers/ptp.
Most drivers under drivers/ptp are not directly related to networking
and operate independently of NICs. They maintain accuracy through their
own mechanisms.
Sorry to put you in this position but the VM clocks should have some
other tree. Or at the very least some clock expert needs to review them.
I noticed you emphasized 'VM clock', but I don’t think it really matters
whether it’s a VM/cloud scenario or not. IMHO whether the PHC is provided
by a chip, FPGA, hypervisor or CIPU makes no fundamental difference.
Could you go complain to clock people? Or virtualization people?
I understand that the PTP implementations in drivers/ptp aren't closely
related to networking though drivers/ptp is included in NETWORKING DRIVERS
in the MAINTAINER file.
I noticed that drivers/ptp/* is also inclued in PTP HARDWARE CLOCK SUPPORT.
This attribution seems more about 'clock'.
Hi @Richard Cochran, could you please review this? Thanks! :)
Regards.