All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Machnikowski, Maciej" <maciej.machnikowski@intel.com>
To: Richard Cochran <richardcochran@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"abyagowi@fb.com" <abyagowi@fb.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>, "bsd@fb.com" <bsd@fb.com>,
	Jonathan Lemon <jonathan.lemon@gmail.com>
Subject: RE: [RFC v2 net-next 1/2] rtnetlink: Add new RTM_GETSYNCESTATE message to get SyncE status
Date: Tue, 31 Aug 2021 22:09:18 +0000	[thread overview]
Message-ID: <SJ0PR11MB4958D55CB9EDD459AF076525EACC9@SJ0PR11MB4958.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210831161927.GA10747@hoboy.vegasvil.org>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: Tuesday, August 31, 2021 6:19 PM
> To: Jakub Kicinski <kuba@kernel.org>
> Subject: Re: [RFC v2 net-next 1/2] rtnetlink: Add new RTM_GETSYNCESTATE
> message to get SyncE status
> 
> On Mon, Aug 30, 2021 at 04:29:09PM -0700, Jakub Kicinski wrote:
> > Can we add a genetlink family for clock info/configuration? From
> > what I understood discussing this with Jonathan it sounded like most
> > clocks today have a vendor-specific character device for configuration
> > and reading status.
> >
> > I'm happy to write the plumbing if this seems like an okay idea
> > but too much work for anyone to commit.
> 
> This sounds nice.
> 
> As you said later on in this thread, any API we merge now will have to
> last.  That is why I'm being so picky here.  We want new APIs to cover
> current HW _and_ be reasonable for the future.
> 
> I don't see a DPLL as either a PTP Hardware Clock or a Network
> Device.  It is a PLL.
> 
> The kernel can and should have a way to represent the relationship
> between these three different kind of IP block.  We already have a
> way to get from PHC to netdev interface.

OK I can strip down the RTNL EEC state interface to only report 
the state without any extras, like pin. Next step would be to add 
the control over recovered clock also to the netdev subsystem.

The EEC state read is needed for recovered/source clock validation
and that's why I think it belongs to the RTNL part as it gates the QL
for each port.

Those two interfaces will allow a minimalistic ESMC support
(receive the packet, extract the SSM from it, check if my clock is
recovered and my clock is in locked state, if all are good - pass
the message along to other related ports)

In parallel let's work on a proper clock generator subsystem. 
For starter It should handle:

 - reference configuration
 - reference status
 - reference priorities
 - output settings

Optionally:
 - NCO mode (here we'll duplicate the functionality of PHC in some 
    deployments)

Once we have that in place we can simply 
- reroute the internals of the EEC state the clock generator subsystem 
  on more complex systems,
- keeping the simple state-read for those who use other simpler
  Implementations of EEC.
- be able to support any hybrid between 1 and 2

Once we get there we'll know what else should this RTNL return and
extend it if needed.

Regards
Maciek

WARNING: multiple messages have this Message-ID (diff)
From: Machnikowski, Maciej <maciej.machnikowski@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [RFC v2 net-next 1/2] rtnetlink: Add new RTM_GETSYNCESTATE message to get SyncE status
Date: Tue, 31 Aug 2021 22:09:18 +0000	[thread overview]
Message-ID: <SJ0PR11MB4958D55CB9EDD459AF076525EACC9@SJ0PR11MB4958.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210831161927.GA10747@hoboy.vegasvil.org>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: Tuesday, August 31, 2021 6:19 PM
> To: Jakub Kicinski <kuba@kernel.org>
> Subject: Re: [RFC v2 net-next 1/2] rtnetlink: Add new RTM_GETSYNCESTATE
> message to get SyncE status
> 
> On Mon, Aug 30, 2021 at 04:29:09PM -0700, Jakub Kicinski wrote:
> > Can we add a genetlink family for clock info/configuration? From
> > what I understood discussing this with Jonathan it sounded like most
> > clocks today have a vendor-specific character device for configuration
> > and reading status.
> >
> > I'm happy to write the plumbing if this seems like an okay idea
> > but too much work for anyone to commit.
> 
> This sounds nice.
> 
> As you said later on in this thread, any API we merge now will have to
> last.  That is why I'm being so picky here.  We want new APIs to cover
> current HW _and_ be reasonable for the future.
> 
> I don't see a DPLL as either a PTP Hardware Clock or a Network
> Device.  It is a PLL.
> 
> The kernel can and should have a way to represent the relationship
> between these three different kind of IP block.  We already have a
> way to get from PHC to netdev interface.

OK I can strip down the RTNL EEC state interface to only report 
the state without any extras, like pin. Next step would be to add 
the control over recovered clock also to the netdev subsystem.

The EEC state read is needed for recovered/source clock validation
and that's why I think it belongs to the RTNL part as it gates the QL
for each port.

Those two interfaces will allow a minimalistic ESMC support
(receive the packet, extract the SSM from it, check if my clock is
recovered and my clock is in locked state, if all are good - pass
the message along to other related ports)

In parallel let's work on a proper clock generator subsystem. 
For starter It should handle:

 - reference configuration
 - reference status
 - reference priorities
 - output settings

Optionally:
 - NCO mode (here we'll duplicate the functionality of PHC in some 
    deployments)

Once we have that in place we can simply 
- reroute the internals of the EEC state the clock generator subsystem 
  on more complex systems,
- keeping the simple state-read for those who use other simpler
  Implementations of EEC.
- be able to support any hybrid between 1 and 2

Once we get there we'll know what else should this RTNL return and
extend it if needed.

Regards
Maciek

  reply	other threads:[~2021-08-31 22:09 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29  8:05 [RFC v2 net-next 0/2] Add RTNL interface for SyncE Maciej Machnikowski
2021-08-29  8:05 ` [Intel-wired-lan] " Maciej Machnikowski
2021-08-29  8:05 ` [RFC v2 net-next 1/2] rtnetlink: Add new RTM_GETSYNCESTATE message to get SyncE status Maciej Machnikowski
2021-08-29  8:05   ` [Intel-wired-lan] " Maciej Machnikowski
2021-08-29 15:10   ` Richard Cochran
2021-08-29 15:10     ` [Intel-wired-lan] " Richard Cochran
2021-08-29 16:42     ` Machnikowski, Maciej
2021-08-29 16:42       ` [Intel-wired-lan] " Machnikowski, Maciej
2021-08-29 20:16       ` Andrew Lunn
2021-08-29 20:16         ` [Intel-wired-lan] " Andrew Lunn
2021-08-30 20:57       ` Richard Cochran
2021-08-30 20:57         ` [Intel-wired-lan] " Richard Cochran
2021-08-30 23:29         ` Jakub Kicinski
2021-08-30 23:29           ` [Intel-wired-lan] " Jakub Kicinski
2021-08-31 10:20           ` Machnikowski, Maciej
2021-08-31 10:20             ` [Intel-wired-lan] " Machnikowski, Maciej
2021-08-31 13:33             ` Jakub Kicinski
2021-08-31 13:33               ` [Intel-wired-lan] " Jakub Kicinski
2021-08-31 14:07               ` Machnikowski, Maciej
2021-08-31 14:07                 ` [Intel-wired-lan] " Machnikowski, Maciej
2021-08-31 14:18                 ` Jakub Kicinski
2021-08-31 14:18                   ` [Intel-wired-lan] " Jakub Kicinski
2021-08-31 15:19                   ` Machnikowski, Maciej
2021-08-31 15:19                     ` [Intel-wired-lan] " Machnikowski, Maciej
2021-08-31 15:32                     ` Jakub Kicinski
2021-08-31 15:32                       ` [Intel-wired-lan] " Jakub Kicinski
2021-08-31 16:00                       ` Machnikowski, Maciej
2021-08-31 16:00                         ` [Intel-wired-lan] " Machnikowski, Maciej
2021-08-31 16:19           ` Richard Cochran
2021-08-31 16:19             ` [Intel-wired-lan] " Richard Cochran
2021-08-31 22:09             ` Machnikowski, Maciej [this message]
2021-08-31 22:09               ` Machnikowski, Maciej
2021-09-01  2:02               ` Jakub Kicinski
2021-09-01  2:02                 ` [Intel-wired-lan] " Jakub Kicinski
2021-09-01  2:56                 ` Richard Cochran
2021-09-01  2:56                   ` [Intel-wired-lan] " Richard Cochran
2021-09-01  1:58             ` Jakub Kicinski
2021-09-01  1:58               ` [Intel-wired-lan] " Jakub Kicinski
2021-09-01  2:55               ` Richard Cochran
2021-09-01  2:55                 ` [Intel-wired-lan] " Richard Cochran
2021-08-29  8:05 ` [RFC v2 net-next 2/2] ice: add support for reading SyncE DPLL state Maciej Machnikowski
2021-08-29  8:05   ` [Intel-wired-lan] " Maciej Machnikowski
2021-08-29 11:11   ` kernel test robot

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=SJ0PR11MB4958D55CB9EDD459AF076525EACC9@SJ0PR11MB4958.namprd11.prod.outlook.com \
    --to=maciej.machnikowski@intel.com \
    --cc=abyagowi@fb.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bsd@fb.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.