linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Machnikowski, Maciej" <maciej.machnikowski@intel.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"nikolay@nvidia.com" <nikolay@nvidia.com>,
	"cong.wang@bytedance.com" <cong.wang@bytedance.com>,
	"colin.king@canonical.com" <colin.king@canonical.com>,
	"gustavoars@kernel.org" <gustavoars@kernel.org>,
	"Bross, Kevin" <kevin.bross@intel.com>,
	"Stanton, Kevin B" <kevin.b.stanton@intel.com>,
	Ahmad Byagowi <abyagowi@fb.com>
Subject: RE: [RFC net-next 1/7] ptp: Add interface for acquiring DPLL state
Date: Tue, 31 Aug 2021 09:29:22 +0000	[thread overview]
Message-ID: <SJ0PR11MB4958827821D5CFBC897E43B3EACC9@SJ0PR11MB4958.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210830210610.GB26230@hoboy.vegasvil.org>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: Monday, August 30, 2021 11:06 PM
> To: Machnikowski, Maciej <maciej.machnikowski@intel.com>
> Subject: Re: [RFC net-next 1/7] ptp: Add interface for acquiring DPLL state
> 
> On Fri, Aug 20, 2021 at 06:30:02PM +0000, Machnikowski, Maciej wrote:
> 
> > So to be able to control SyncE we need 2 interfaces:
> > - Interface to enable the recovered clock output at the given pin
> > - interface to monitor the DPLL to see if the clock that we got is valid, or
> not.
> >
> > If it comes to ESMC (G.8264) messages, SyncE itself can run in 2 modes
> (slides 29/30 will give you more details):
> > - QL-Disabled - with no ESMC messages - it base on the local information
> from the PLL to make all decisions
> > - QL-Enabled - that adds ESMC and quality message transfer between the
> nodes.
> 
> How do you get the QL codes from this?
> 
> +enum if_eec_state {
> +       IF_EEC_STATE_INVALID = 0,
> +       IF_EEC_STATE_FREERUN,
> +       IF_EEC_STATE_LOCKACQ,
> +       IF_EEC_STATE_LOCKREC,
> +       IF_EEC_STATE_LOCKED,
> +       IF_EEC_STATE_HOLDOVER,
> +       IF_EEC_STATE_OPEN_LOOP,
> +       __IF_EEC_STATE_MAX,
> +};

This structure is for monitoring the lock state - or in other words - quality 
of incoming sync signal. 

The Locked state here means that the frequency used for transmitting the 
data is syntonized with the input one. If something goes wrong, like the 
frequency you recover from the link goes beyond the specified range or 
the external signal is lost, the QL level will change accordingly.

The application layer running on top of this API needs to get the proper
QL level from the config file (just like the clockClass in PTP) and broadcast
it when the state is locked and switch to QL-DNU when you get out of 
the lock state and expire preset hw-dependent holdover clock.

Also, if you are syntonizing to the SyncE clock you need to wait with
passing along QL-levels until the state reported by the EEC changes
to LOCKED.

Regards
Maciek


  reply	other threads:[~2021-08-31  9:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 16:07 [RFC net-next 0/7] Add basic SyncE interfaces Arkadiusz Kubalewski
2021-08-16 16:07 ` [RFC net-next 1/7] ptp: Add interface for acquiring DPLL state Arkadiusz Kubalewski
2021-08-16 23:54   ` Richard Cochran
2021-08-17  9:41     ` Machnikowski, Maciej
2021-08-18 17:02       ` Richard Cochran
2021-08-18 18:14         ` [Intel-wired-lan] " Keller, Jacob E
2021-08-18 22:36         ` Machnikowski, Maciej
2021-08-19 15:34           ` Richard Cochran
2021-08-19 15:40             ` Machnikowski, Maciej
2021-08-20 15:55               ` Richard Cochran
2021-08-20 18:30                 ` Machnikowski, Maciej
2021-08-22  1:50                   ` Richard Cochran
2021-08-22  2:30                   ` Richard Cochran
2021-08-23  8:29                     ` Machnikowski, Maciej
2021-08-30 21:06                   ` Richard Cochran
2021-08-31  9:29                     ` Machnikowski, Maciej [this message]
2021-08-16 16:07 ` [RFC net-next 2/7] selftests/ptp: Add usage of PTP_DPLL_GETSTATE ioctl in testptp Arkadiusz Kubalewski
2021-08-16 23:54   ` Richard Cochran
2021-08-16 16:07 ` [RFC net-next 3/7] ice: add get_dpll_state ptp interface usage Arkadiusz Kubalewski
2021-08-16 16:07 ` [RFC net-next 4/7] net: add ioctl interface for recover reference clock on netdev Arkadiusz Kubalewski
2021-08-16 19:46   ` Arnd Bergmann
2021-08-17 10:35     ` Kubalewski, Arkadiusz
2021-08-22  1:25   ` Richard Cochran
2021-08-16 16:07 ` [RFC net-next 5/7] selftests/net: Add test app for SIOC{S|G}SYNCE Arkadiusz Kubalewski
2021-08-16 16:07 ` [RFC net-next 6/7] ice: add SIOC{S|G}SYNCE interface usage to recover reference signal Arkadiusz Kubalewski
2021-08-16 16:07 ` [RFC net-next 7/7] ice: add sysfs interface to configure PHY recovered " Arkadiusz Kubalewski
2021-08-18 17:05 ` [RFC net-next 0/7] Add basic SyncE interfaces Richard Cochran
2021-08-18 17:08 ` Richard Cochran

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=SJ0PR11MB4958827821D5CFBC897E43B3EACC9@SJ0PR11MB4958.namprd11.prod.outlook.com \
    --to=maciej.machnikowski@intel.com \
    --cc=abyagowi@fb.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=arnd@arndb.de \
    --cc=colin.king@canonical.com \
    --cc=cong.wang@bytedance.com \
    --cc=davem@davemloft.net \
    --cc=gustavoars@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kevin.b.stanton@intel.com \
    --cc=kevin.bross@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=richardcochran@gmail.com \
    --cc=shuah@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).