[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c70a049b-cef8-4b9d-8fd6-e9d8ec0270cc@prolan.hu>
Date: Tue, 17 Sep 2024 09:53:07 +0200
From: Csókás Bence <csokas.bence@...lan.hu>
To: Frank Li <Frank.li@....com>
CC: <imx@...ts.linux.dev>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Wei Fang <wei.fang@....com>, Shenwei Wang
<shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Richard Cochran
<richardcochran@...il.com>
Subject: Re: [PATCH 2/2] net: fec: Reload PTP registers after link-state
change
Hi!
On 9/16/24 17:05, Frank Li wrote:
> On Mon, Sep 16, 2024 at 04:19:31PM +0200, Csókás, Bence wrote:
>> On link-state change, the controller gets reset,
>> which clears all PTP registers, including PHC time,
>> calibrated clock correction values etc. For correct
>> IEEE 1588 operation we need to restore these after
>> the reset.
>
> I am not sure if it necessary. timer will be big offset after reset. ptpd
> should set_time then do clock frequency adjust, supposed just few ms, ptp
> time will get resync.
>
> of course, restore these value may reduce the resync time.
>
> Frank
There's 3 problems with that:
1. ATCORR, ATINC and ATPER will not be restored, therefore precision
will be immediately lost.
2. ptpd does NOT set the time, only once, on startup. Currently, on
link-down, ptpd tries to correct for the missing 54 years by making the
PHC tick 3% faster (therefore the PPS signal will have a frequency error
as well), which will never get it there. One work-around is to
periodically re-start ptpd, but this is obviously sub-optimal.
3. If the PTP server goes away, there's no way to restore the time.
Whereas if you save and reload it, you can continue, although with
degraded precision.
Bence
Powered by blists - more mailing lists