From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: Jakub Kicinski <kuba@kernel.org>, netdev@vger.kernel.org
Subject: Re: Testing selectable timestamping - where are the tools for this feature?
Date: Wed, 13 Nov 2024 16:52:20 +0000 [thread overview]
Message-ID: <ZzTZRCWLxHZ_WDhW@shell.armlinux.org.uk> (raw)
In-Reply-To: <20241113171443.697ac278@kmaincent-XPS-13-7390>
On Wed, Nov 13, 2024 at 05:14:43PM +0100, Kory Maincent wrote:
> On Wed, 13 Nov 2024 15:57:56 +0000
> "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
>
> > On Wed, Nov 13, 2024 at 04:16:02PM +0100, Kory Maincent wrote:
> > > Hello Russell,
> > >
> > > On Wed, 13 Nov 2024 14:46:25 +0000
> > > "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
> > >
> > > > Hi Kory,
> > > >
> > > > I've finally found some cycles (and time when I'm next to the platform)
> > > > to test the selectable timestamping feature. However, I'm struggling to
> > > > get it to work.
> > > >
> > > > In your email
> > > > https://lore.kernel.org/20240709-feature_ptp_netnext-v17-0-b5317f50df2a@bootlin.com/
> > > > you state that "You can test it with the ethtool source on branch
> > > > feature_ptp of: https://github.com/kmaincent/ethtool". I cloned this
> > > > repository, checked out the feature_ptp branch, and while building
> > > > I get the following warnings:
> > > >
> > > > My conclusion is... your ethtool sources for testing this feature are
> > > > broken, or this is no longer the place to test this feature.
> > >
> > > Yeah, it was for v3 of the patch series. It didn't follow up to v19, I am
> > > using ynl tool which is the easiest way to test it.
> > > As there were a lot of changes along the way, updating ethtool every time
> > > was not a good idea.
> > >
> > > Use ynl tool. Commands are described in the last patch of the series:
> > > https://lore.kernel.org/all/20241030-feature_ptp_netnext-v19-10-94f8aadc9d5c@bootlin.com/
> > >
> > > You simply need to install python python-yaml and maybe others python
> > > subpackages.
> > > Copy the tool "tools/net/ynl" and the specs "Documentation/netlink/" on the
> > > board.
> > >
> > > Then run the ynl commands.
> >
> > Thanks... fairly unweildly but at least it's functional. However,
> > running the first, I immediately find a problem:
> >
> > # ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --dump
> > tsinfo-get --json '{"header":{"dev-name":"eth0"}}'
> >
> > One would expect this to only return results for eth0 ?
>
> Indeed it should! That's weird, I will investigate.
>
> > Also, I don't see more than one timestamper on any interface - there
> > should be two on eth2, one for the MAC and one for the PHY. I see the
> > timestamper for the mvpp2 MAC, but nothing for the PHY. The PTP clock
> > on the PHY is definitely registered (/dev/ptp0), which means
> > phydev->mii_ts should be pointing to the MII timestamper for the PHY.
> >
> > I've also tried with --json '{"header":{"dev-name":"eth2"}}' but no
> > difference - it still reports all interfaces and only one timestamper
> > for eth2.
>
> Sorry forgot to explain that you need to register PTP clock with the function
> phydev_ptp_clock_register() in the PHY driver.
That is certainly inconvenient. Marvell's PHY PTP/TAI implementation is
used elsewhere, so the TAI driver is not specific to it being on a PHY.
The drivers/ptp/marvell*.c that you find in my patches is meant to
eventually replace drivers/net/dsa/mv88e6xxx/ptp.c - the same hardware
block is in Marvell's DSA switches.
> It will be changed in v20 as request by Jakub. I will save the hwtstamp source
> and phydev pointer in the netdev core instead.
I think I'll shelve this until that happens, hopefully that will mean
my existing code will work and remain a re-usable library.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-11-13 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 14:46 Testing selectable timestamping - where are the tools for this feature? Russell King (Oracle)
2024-11-13 15:16 ` Kory Maincent
2024-11-13 15:57 ` Russell King (Oracle)
2024-11-13 16:14 ` Kory Maincent
2024-11-13 16:41 ` Kory Maincent
2024-11-13 16:52 ` Russell King (Oracle) [this message]
2024-11-13 17:02 ` Kory Maincent
2024-11-14 20:20 ` Russell King (Oracle)
2024-11-15 9:11 ` Kory Maincent
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=ZzTZRCWLxHZ_WDhW@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.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).