Re: [PATCH net-next 1/9] ptp: Clarify ptp_clock_info .adjphase expects an internal servo to be used
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Date: 2023-05-11 20:21:08
On Wed, 10 May, 2023 19:09:40 -0700 Richard Cochran [off-list ref] wrote:
On Wed, May 10, 2023 at 01:52:58PM -0700, Rahul Rameshbabu wrote:quoted
+PTP hardware clock requirements for '.adjphase' +----------------------------------------------- + + The 'struct ptp_clock_info' interface has a '.adjphase' function. + This function has a set of requirements from the PHC in order to be + implemented. + + * The PHC implements a servo algorithm internally that is used to + correct the offset passed in the '.adjphase' call. + * When other PTP adjustment functions are called, the PHC servo + algorithm is disabled,I disagree with this part:quoted
and the frequency prior to the '.adjphase' + call is restored internally in the PHC.That seems like an arbitrary rule that doesn't make much sense.
If the PHC does not restore the frequency, won't the value cached in the ptp stack in the kernel become inaccurate compared to the frequency change induced by the '.adjphase' call? This concern is why I added this clause in the documentation. Let me know if my understanding is off with regards to this. I think we had a similar conversation on this previously in the mailing list. https://lore.kernel.org/netdev/Y88L6EPtgvW4tSA+@hoboy.vegasvil.org/ (local)
Thanks, Richard
-- Rahul Rameshbabu