public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Wen Gu <guwen@linux.alibaba.com>, Andrew Lunn <andrew@lunn.ch>,
	Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Richard Cochran <richardcochran@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Dust Li <dust.li@linux.alibaba.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	David Woodhouse <dwmw2@infradead.org>,
	virtualization@lists.linux.dev, Nick Shi <nick.shi@broadcom.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-clk@vger.kernel.org
Subject: Re: [RFC] Defining a home/maintenance model for non-NIC PHC devices using the /dev/ptpX API
Date: Wed, 14 Jan 2026 10:50:52 +0000	[thread overview]
Message-ID: <c85c77bc-9a8c-4336-ab79-89a981c43e01@linux.dev> (raw)
In-Reply-To: <b5a60753-85ed-4d61-a652-568393e0dff3@linux.alibaba.com>

On 14/01/2026 09:13, Wen Gu wrote:
> 
> 
> On 2026/1/12 22:52, Vadim Fedorenko wrote:
>> On 12/01/2026 13:24, Andrew Lunn wrote:
>>>>> drivers/ptp/core    - API as written above
>>>>> drivers/ptp/virtual - all PtP drivers somehow emulating a PtP clock
>>>>>                         (like the ptp_s390 driver)
>>>>> drivers/ptp/net     - all NIC related drivers.
>>>>>
>>>>
>>>>
>>>> Well, drivers/ptp/virtual is not really good, because some drivers are
>>>> for physical devices exporting PTP interface, but without NIC.
>>>
>>> If the lack of a NIC is the differentiating property:
>>>
>>>>> drivers/ptp/net     - all NIC related drivers.
>>>>> drivers/ptp/netless - all related drivers which are not associated 
>>>>> to a NIC.
>>>
>>> Or
>>>
>>>>> drivers/ptp/emulating - all drivers emulating a PtP clock
>>
>> I would go with "emulating" then.
>>
>>>
>>>     Andrew
> 
> Thank you all for your suggestions.
> 
> The drivers under drivers/ptp can be divided into (to my knowledge):
> 
> 1. Network/1588-oriented clocks, which allow the use of tools like
>     ptp4l to synchronize the local PHC with an external reference clock
>     (based on the network or other methods) via the 1588 protocol to
>     maintain accuracy. Examples include:
> 
>     - ptp_dte
>     - ptp_qoriq
>     - ptp_ines
>     - ptp_pch
>     - ptp_idt82p33
>     - ptp_clockmatrix
>     - ptp_fc3
>     - ptp_mock (mock/testing)
>     - ptp_dfl_tod
>     - ptp_netc
>     - ptp_ocp (a special case which provides a grandmaster
>                clock for a PTP enabled network, generally
>                serves as the reference clock)

ptp_ocp is a timecard driver, which doesn't require calibration by
ptp4l/ts2phc. OCP TimeCards have their own Atomic Clock onboard which
is disciplined by 1-PPS or 10mhz signal from configurable source. The
disciplining algorithm is implemented in Atomic Clock package
controller. The driver exposes ptp device mostly for reading the time.
So I believe it belongs to group 2 rather than 1588 group.

> 
> 2. Platform/infrastructure/hypervisor-provided clocks. They don't
>     require calibration by ptp4l based on 1588 and reference clocks,
>     instead the underlay handle this. Users generally read the time.
>     They include:
> 
>     - ptp_kvm
>     - ptp_vmclock
>     - ptp_vmw
>     - ptp_s390
>     - ptp_cipu (upstreaming)
> 
>  From this perspective, I agree that "emulating" could be an appropriate
> name for the second ones.
> 
> And I would like to further group the first ones to "1588", thus
> divide drivers/ptp to:
> 
> - drivers/ptp/core
> - drivers/ptp/1588
> - drivers/ptp/emulating
> 
> Regards.


  reply	other threads:[~2026-01-14 10:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  2:56 [RFC] Defining a home/maintenance model for non-NIC PHC devices using the /dev/ptpX API Wen Gu
2026-01-12  8:04 ` David Woodhouse
2026-01-14  9:06   ` Wen Gu
2026-01-12 11:00 ` Sven Schnelle
2026-01-12 12:15   ` Vadim Fedorenko
2026-01-12 13:24     ` Andrew Lunn
2026-01-12 14:52       ` Vadim Fedorenko
2026-01-14  9:13         ` Wen Gu
2026-01-14 10:50           ` Vadim Fedorenko [this message]
2026-01-14 12:45             ` Wen Gu
2026-01-13  4:21 ` Richard Cochran
2026-01-14  9:16   ` Wen Gu
2026-01-19 14:48 ` Manivannan Sadhasivam
2026-01-21 14:20   ` Wen Gu
2026-01-21 14:29 ` Wen Gu
2026-02-19  9:29   ` Imran Shaik
2026-02-25  1:45     ` Wen Gu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c85c77bc-9a8c-4336-ab79-89a981c43e01@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=dust.li@linux.alibaba.com \
    --cc=dwmw2@infradead.org \
    --cc=guwen@linux.alibaba.com \
    --cc=kuba@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nick.shi@broadcom.com \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox