lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250821144756.7385b313@kmaincent-XPS-13-7390>
Date: Thu, 21 Aug 2025 14:47:56 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Donald Hunter
 <donald.hunter@...il.com>, Jonathan Corbet <corbet@....net>, Heiner
 Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>,
 Maxime Chevallier <maxime.chevallier@...tlin.com>, Nishanth Menon
 <nm@...com>, kernel@...gutronix.de, linux-kernel@...r.kernel.org,
 netdev@...r.kernel.org, UNGLinuxDriver@...rochip.com,
 linux-doc@...r.kernel.org, Michal Kubecek <mkubecek@...e.cz>, Roan van Dijk
 <roan@...tonic.nl>
Subject: Re: [PATCH net-next v4 2/5] ethtool: netlink: add
 ETHTOOL_MSG_MSE_GET and wire up PHY MSE access

Le Thu, 21 Aug 2025 12:15:48 +0200,
Oleksij Rempel <o.rempel@...gutronix.de> a écrit :

> Hello Kory,
> 
> On Thu, Aug 21, 2025 at 11:59:14AM +0200, Kory Maincent wrote:
> > Hello Oleksij,
> > 
> > Le Thu, 21 Aug 2025 11:10:58 +0200,
> > Oleksij Rempel <o.rempel@...gutronix.de> a écrit :
> >   
> > > Introduce the userspace entry point for PHY MSE diagnostics via
> > > ethtool netlink. This exposes the core API added previously and
> > > returns both configuration and one or more snapshots.
> > > 
> > > Userspace sends ETHTOOL_MSG_MSE_GET with an optional channel
> > > selector. The reply carries:
> > >   - ETHTOOL_A_MSE_CONFIG: scale limits, timing, and supported
> > >     capability bitmask
> > >   - ETHTOOL_A_MSE_SNAPSHOT+: one or more snapshots, each tagged
> > >     with the selected channel
> > > 
> > > If no channel is requested, the kernel returns snapshots for all
> > > supported selectors (per‑channel if available, otherwise WORST,
> > > otherwise LINK). Requests for unsupported selectors fail with
> > > -EOPNOTSUPP; link down returns -ENOLINK.
> > > 
> > > Changes:
> > >   - YAML: add attribute sets (mse, mse-config, mse-snapshot) and
> > >     the mse-get operation
> > >   - UAPI (generated): add ETHTOOL_A_MSE_* enums and message IDs,
> > >     ETHTOOL_MSG_MSE_GET/REPLY
> > >   - ethtool core: add net/ethtool/mse.c implementing the request,
> > >     register genl op, and hook into ethnl dispatch
> > >   - docs: document MSE_GET in ethtool-netlink.rst
> > > 
> > > The include/uapi/linux/ethtool_netlink_generated.h is generated
> > > from Documentation/netlink/specs/ethtool.yaml.
> > > 
> > > Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>  
> > 
> > ...
> >   
> > > +MSE Configuration
> > > +-----------------
> > > +
> > > +This nested attribute contains the full configuration properties for the
> > > MSE +measurements
> > > +
> > > +  ===============================================  ======
> > > ====================
> > > +  ETHTOOL_A_MSE_CONFIG_MAX_AVERAGE_MSE             u32     max avg_mse
> > > scale
> > > +  ETHTOOL_A_MSE_CONFIG_MAX_PEAK_MSE                u32     max peak_mse
> > > scale
> > > +  ETHTOOL_A_MSE_CONFIG_REFRESH_RATE_PS             u64     sample rate
> > > (ps)
> > > +  ETHTOOL_A_MSE_CONFIG_NUM_SYMBOLS                 u64     symbols per
> > > sample
> > > +  ETHTOOL_A_MSE_CONFIG_SUPPORTED_CAPS              bitset  capability
> > > bitmask
> > > +  ===============================================  ======
> > > ==================== +  
> > 
> > Why did you remove the kernel doc identifiers to phy_mse_config?
> > It was useful for the documentation.
> >   
> > > +MSE Snapshot
> > > +------------
> > > +
> > > +This nested attribute contains an atomic snapshot of MSE values for a
> > > specific +channel or for the link as a whole.
> > > +
> > > +  ===============================================  ======
> > > ======================
> > > +  ETHTOOL_A_MSE_SNAPSHOT_CHANNEL                   u32     channel enum
> > > value
> > > +  ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE               u32     average MSE
> > > value
> > > +  ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE                  u32     current peak
> > > MSE
> > > +  ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE            u32     worst-case
> > > peak MSE
> > > +  ===============================================  ======  
> > 
> > Same question here for phy_mse_snapshot.  
> 
> I had following warnings:
> Documentation/networking/ethtool-netlink:2499: ./include/linux/phy.h:3:
> WARNING: Duplicate C declaration, also defined at kapi:892. Declaration is
> '.. c:struct:: phy_mse_config'.
> Documentation/networking/ethtool-netlink:2515: ./include/linux/phy.h:3:
> WARNING: Duplicate C declaration, also defined at kapi:915. Declaration is
> '.. c:struct:: phy_mse_snapshot'
> 
> I didn't found proper was to solve it, so I removed them.

Indeed kapi.rst is already referencing phy.h globally.
I don't know if there is a way to avoid this warning.

Else you could simply add something like that:
See ``struct phy_mse_config`` Kernel documentation defined in
``include/linux/phy.h``

Regards
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ