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] [day] [month] [year] [list]
Message-ID: <AM0PR04MB41311656237FCCCDBD3A497A89952@AM0PR04MB4131.eurprd04.prod.outlook.com>
Date: Wed, 28 Aug 2024 17:00:50 +0000
From: "Wilkins, Stephen" <Stephen.Wilkins@...edyne.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Conor Dooley <conor@...nel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, Conor Dooley <conor.dooley@...rochip.com>,
	"valentina.fernandezalanis@...rochip.com"
	<valentina.fernandezalanis@...rochip.com>, Nicolas Ferre
	<nicolas.ferre@...rochip.com>, Claudiu Beznea <claudiu.beznea@...on.dev>,
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Russell
 King" <linux@...linux.org.uk>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [RFC net-next] net: macb: add support for configuring eee via
 ethtool

In my case, it's not that I've had an issue with EEE not working, it's that I've found on other products it makes the Ethernet link more susceptible to link down events during some harsh EMC immunity tests, and we have prioritised link robustness over power saving.

I don't know enough about the Cadence MAC in the PolarFire SOC to know if EEE would work correctly without extra setup, but the initial feedback from Nicolas implied probably not. On other platforms, I've used ethtool to disable advertisement via an init script, but I think the cleanest option for this project is to force the PHY to disable advertisement via the dts, at least until EEE support for the macb driver is fully implemented.

Steve
________________________________________
From: Andrew Lunn <andrew@...n.ch>
Sent: 28 August 2024 17:18
To: Wilkins, Stephen <Stephen.Wilkins@...edyne.com>
Cc: Conor Dooley <conor@...nel.org>; netdev@...r.kernel.org <netdev@...r.kernel.org>; Conor Dooley <conor.dooley@...rochip.com>; valentina.fernandezalanis@...rochip.com <valentina.fernandezalanis@...rochip.com>; Nicolas Ferre <nicolas.ferre@...rochip.com>; Claudiu Beznea <claudiu.beznea@...on.dev>; David S. Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Russell King <linux@...linux.org.uk>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>
Subject: Re: [RFC net-next] net: macb: add support for configuring eee via ethtool
 
---External Email---

On Wed, Aug 28, 2024 at 03:47:21PM +0000, Wilkins, Stephen wrote:
> Thanks for the feedback.
>
> In my particular use-case I wanted to ensure the PHY didn't advertise EEE
> support, as it can cause issues in our deployment environment. The problem I
> had was the PHY we are using enables EEE advertisement by default, and the
> generic phy support in phy_device.c reads the c45 registers and enables EEE if
> there are any linkmodes already advertised. Without the phylink hook in macb, I
> couldn't use ethtool to disable it, but I now see my patch is only a partial
> solution and would also imply support that is missing. That's why code reviews
> are important. Maybe I need an alternative approach for ensuring the PHY
> advertising is disabled if the MAC layer support is missing.

In this particular case, do you know what is causing you problems?

I agree that if the MAC does not support EEE, the PHY should not be
advertising it. But historically EEE has been a mess. It could be the
MAC does EEE by default, using default settings, and the PHY is
advertising EEE, and the link partner is happy, and EEE just works. So
if we turn advertisement of EEE off by default, we might cause
regressions :-(

Now, we know some PHYs are actually broken. And we have a standard way
to express this:

Documentation/devicetree/bindings/net/ethernet-phy.yaml

  eee-broken-100tx:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      Mark the corresponding energy efficient ethernet mode as
      broken and request the ethernet to stop advertising it.

  eee-broken-1000t:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      Mark the corresponding energy efficient ethernet mode as
      broken and request the ethernet to stop advertising it.

If you know this MAC/PHY combination really is broken, not that it is
just missing support for EEE, you could add these properties to your
device tree.

Otherwise, you do a very minimal EEE implementation. After connecting
to the PHY call phy_ethtool_set_eee() with everything in data set to
0. That should disable adverting of EEE.

        Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ