From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Kory Maincent <kory.maincent@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Nishanth Menon <nm@ti.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
linux-doc@vger.kernel.org, Michal Kubecek <mkubecek@suse.cz>,
Roan van Dijk <roan@protonic.nl>
Subject: Re: [PATCH net-next v7 2/5] ethtool: netlink: add ETHTOOL_MSG_MSE_GET and wire up PHY MSE access
Date: Sat, 25 Oct 2025 07:37:17 +0200 [thread overview]
Message-ID: <aPxiDazeEsR1lkgK@pengutronix.de> (raw)
In-Reply-To: <20251024161213.2ed58127@kernel.org>
Hi Jakub,
On Fri, Oct 24, 2025 at 04:12:13PM -0700, Jakub Kicinski wrote:
> On Fri, 24 Oct 2025 15:18:04 +0200 Oleksij Rempel wrote:
> > Hi Jakub,
> >
> > On Thu, Oct 23, 2025 at 06:13:43PM -0700, Jakub Kicinski wrote:
> > > On Mon, 20 Oct 2025 12:31:44 +0200 Oleksij Rempel wrote:
> > > > + -
> > > > + name: supported-caps
> > > > + type: nest
> > > > + nested-attributes: bitset
> > > > + enum: phy-mse-capability
> > >
> > > This is read only, does it really have to be a bitset?
> >
> > It describes the capabilities of the driver/hardware. You can get always
> > everything... Hm... I think we continue without capabilities for now and
> > also remove the specific channel request.
>
> That's not what I'm saying. I'm just saying that it could be a basic
> uint with appropriate enum rather than bitset? At least with YNL its
> much easier to deal with. The main advantage of bitset is that you
> can modify individual bits, but that doesn't apply to read-only fields.
>
> Sorry if I'm confused.
after discussing this with Marc Kleine-Budde, I realized that the current
MSE interface is not fully thought through.
Right now the interface lets user space select a specific channel to
poll, but that's not the only relevant selector. Each channel can expose
multiple metrics, and if we ever want to reduce the amount of data for
faster polling, we'll need a different, flag-based selector to describe
which parameters to fetch.
At the moment, however, the kernel simply returns all information that
the PHY can provide. In this situation, the capability flags are mostly
useful inside the kernel, but redundant for user space - we already
provide the values themselves, so there's no need for an extra
"supported-caps" flag set. They duplicate what the user already sees in
the reply (we have a value, and a flag telling that we have this value).
Still, user space needs part of the capabilities structure - the scale
and timing information (max-MSE ranges, refresh rate, number of symbols)
- to interpret the results and choose an appropriate polling rate.
So for the next revision I plan to:
- drop the user-space channel selector completely (the kernel will always
return all available channels),
- remove the capability bitset from the UAPI,
- keep only the scale/timing fields in the capabilities nest,
- retain capability flags internally in the PHY API for kernel use.
Thanks,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-10-25 5:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 10:31 [PATCH net-next v7 0/5] ethtool: introduce PHY MSE diagnostics UAPI and drivers Oleksij Rempel
2025-10-20 10:31 ` [PATCH net-next v7 1/5] ethtool: introduce core UAPI and driver API for PHY MSE diagnostics Oleksij Rempel
2025-10-20 10:31 ` [PATCH net-next v7 2/5] ethtool: netlink: add ETHTOOL_MSG_MSE_GET and wire up PHY MSE access Oleksij Rempel
2025-10-23 9:10 ` Paolo Abeni
2025-10-24 1:13 ` Jakub Kicinski
2025-10-24 13:18 ` Oleksij Rempel
2025-10-24 23:12 ` Jakub Kicinski
2025-10-25 5:37 ` Oleksij Rempel [this message]
2025-10-20 10:31 ` [PATCH net-next v7 3/5] ethtool: netlink: add lightweight MSE reporting to LINKSTATE_GET Oleksij Rempel
2025-10-24 1:10 ` Jakub Kicinski
2025-10-20 10:31 ` [PATCH net-next v7 4/5] net: phy: micrel: add MSE interface support for KSZ9477 family Oleksij Rempel
2025-10-20 10:31 ` [PATCH net-next v7 5/5] net: phy: dp83td510: add MSE interface support for 10BASE-T1L Oleksij Rempel
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=aPxiDazeEsR1lkgK@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=roan@protonic.nl \
/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).