From: Andrew Lunn <andrew@lunn.ch>
To: Richard Cochran <richardcochran@gmail.com>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: ethtool: allow MAC drivers to override ethtool get_ts_info
Date: Thu, 21 Jan 2021 19:55:34 +0100 [thread overview]
Message-ID: <YAnOJhG1Eh4gjglr@lunn.ch> (raw)
In-Reply-To: <20210121170347.GA22517@hoboy.vegasvil.org>
On Thu, Jan 21, 2021 at 09:03:47AM -0800, Richard Cochran wrote:
> On Thu, Jan 21, 2021 at 05:22:37PM +0100, Andrew Lunn wrote:
>
> > There is a growing interesting in PTP, the number of drivers keeps
> > going up. The likelihood of MAC/PHY combination having two
> > timestamping sources is growing all the time. So the stack needs to
> > change to support the selection of the timestamp source.
>
> Fine, but How should the support look like?
>
> - New/extended time stamping API that delivers multiple time stamps?
>
> - sysctl to select MAC/PHY preference at run time globally?
>
> - per-interface ethtool control?
>
> - per-socket control? (probably not feasible, but heh)
>
> Back of the napkin design ideas appreciated!
Do you know of any realistic uses cases for using two time stampers
for the same netdev? If we can eliminate that, then it is down to
selecting which one to use. And i would say, the selection needs to be
per netdev.
I don't know the ptp subsystem very well, but it seems like
ptp_clock_register() does not know which netdev the device is being
registered against. Is it guaranteed that parent is actual a MAC?
Seems like adding a netdev member to that call could be good, so the
core knows what stampers are available per netdev. It then becomes
possible to enumerate the stampers associated to a netdev, and to
select one to be used.
get_ts_info() is a problem because the MAC directly implements it. It
seems like you need all kAPI calls to go into the ptp core. It can
then call into the selected driver. So ptp_clock_info might need
additional methods, get_ts_info() for example.
Andrew
next prev parent reply other threads:[~2021-01-21 19:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 11:13 [PATCH net-next] net: ethtool: allow MAC drivers to override ethtool get_ts_info Russell King
2021-01-10 16:35 ` Andrew Lunn
2021-01-14 3:05 ` Jakub Kicinski
2021-01-14 17:09 ` Russell King - ARM Linux admin
2021-01-14 17:27 ` Russell King - ARM Linux admin
2021-01-14 12:55 ` Richard Cochran
2021-01-14 13:22 ` Russell King - ARM Linux admin
2021-01-14 13:32 ` Russell King - ARM Linux admin
2021-01-14 17:27 ` Richard Cochran
2021-01-14 17:31 ` Russell King - ARM Linux admin
2021-01-14 22:38 ` Russell King - ARM Linux admin
2021-01-21 4:04 ` Richard Cochran
2021-01-21 10:27 ` Russell King - ARM Linux admin
2021-01-21 15:06 ` Richard Cochran
2021-01-21 16:22 ` Andrew Lunn
2021-01-21 17:03 ` Richard Cochran
2021-01-21 18:55 ` Andrew Lunn [this message]
2021-01-21 22:59 ` Russell King - ARM Linux admin
2021-01-21 18:18 ` Russell King - ARM Linux admin
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=YAnOJhG1Eh4gjglr@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--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 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).