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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZtgUthjSJYgJEMmH@pengutronix.de>
Date: Wed, 4 Sep 2024 10:05:10 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net,
	netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
	Vladimir Oltean <olteanv@...il.com>, andrew@...n.ch,
	hkallweit1@...il.com, linux@...linux.org.uk,
	woojung.huh@...rochip.com
Subject: Re: [RFC net-next 1/2] net: ethtool: plumb PHY stats to PHY drivers

Hi all,

On Wed, Sep 04, 2024 at 09:20:24AM +0200, Maxime Chevallier wrote:
> Hi Jakub,
> 
> On Fri, 30 Aug 2024 11:30:47 -0700
> Jakub Kicinski <kuba@...nel.org> wrote:
> 
> > On Fri, 30 Aug 2024 10:16:30 +0200 Maxime Chevallier wrote:
> > > > +static void
> > > > +ethtool_get_phydev_stats(struct net_device *dev,
> > > > +			 struct linkstate_reply_data *data)
> > > > +{
> > > > +	struct phy_device *phydev = dev->phydev;    
> > > 
> > > This would be a very nice spot to use the new
> > > ethnl_req_get_phydev(), if there are multiple PHYs on that device.
> > > Being able to access the stats individually can help
> > > troubleshoot HW issues.
> > >   
> > > > +static void
> > > > +ethtool_get_phydev_stats(struct net_device *dev, struct stats_reply_data *data)
> > > > +{
> > > > +	struct phy_device *phydev = dev->phydev;    
> > > 
> > > Here as well, but that's trickier, as the MAC can override the PHY
> > > stats, but it doesn't know which PHY were getting the stats from.
> > > 
> > > Maybe we could make so that when we pass a phy_index in the netlink
> > > command, we don't allow the mac to override the phy stats ? Or better,
> > > don't allow the mac to override these stats and report the MAC-reported
> > > PHY stats alongside the PHY-reported stats ?  
> > 
> > Maybe we can flip the order of querying regardless of the PHY that's
> > targeted? Always query the MAC first and then the PHY, so that the
> > PHY can override. Presumably the PHY can always provide more detailed
> > stats than the MAC (IOW if it does provide stats they will be more
> > accurate).
> 
> I think that could work indeed, good point.
> 
> [...]
> 
> > > I'm all in for getting the PHY stats from netlink though :)  
> > 
> > Great! FWIW I'm not sure what the status of these patches is.
> > I don't know much about PHYs.
> > I wrote them to help Oleksij out with the "netlink parts".
> > I'm not sure how much I convinced Andrew about the applicability.
> > And I don't know if this is enough for Oleksij to take it forward.
> > So in the unlikely even that you have spare cycles and a PHY you can
> > test with, do not hesitate to take these, rework, reset the author 
> > and repost... :)
> 
> I do have some hardware I can test this on, and I'm starting to get
> familiar with netlink :) I can give it a try, however I can't guarantee
> as of right now that I'll be able to send anything before net-next
> closes. I'll ping here if I start moving forward with this :)

I reserved some time for this work. I hope it will be this year.

In case some one else will start working on it, please let me know :)

Regard,
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 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ