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: <20241003222821.2jngvjyaqbp4ibub@skbuf>
Date: Fri, 4 Oct 2024 01:28:21 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: remove obsolete phylink dsa_switch
 operations

On Thu, Oct 03, 2024 at 04:28:57PM +0100, Russell King (Oracle) wrote:
> Yes, that's correct, but let's keep it to this for the moment.
> 
> There's more to do with mac_select_pcs(). When it was introdued, we
> needed a way to distinguish whether the method was actually implemented
> or whether the old phylink_set_pcs() function was being used. Those days
> are long gone, so returning ERR_PTR(-EOPNOTSUPP) no longer makes much
> sense.
> 
> DSA's core code returns this, as does mv88e6xxx when the chip doesn't
> have any pcs_ops (I'm not sure now why I did the latter now.)
> 
> So, I'd like to (a) make mv88e6xxx_mac_select_pcs() return NULL, then
> kill dsa_port_phylink_mac_select_pcs() and then eliminate:
> 
>         if (mac_ops->mac_select_pcs &&
>             mac_ops->mac_select_pcs(config, PHY_INTERFACE_MODE_NA) !=
>               ERR_PTR(-EOPNOTSUPP))
>                 using_mac_select_pcs = true;
> 
> replacing all other cases of pl->using_mac_select_pcs with a test
> for pl->mac_ops->mac_select_pcs being non-NULL.
> 
> However, that's for later - I think for this patch, it makes sense
> to keep returning the ERR_PTR() value because that's what it was
> doing prior to this patch - we're then only removing the members
> on the dsa_switch_ops and their callsite in this patch.

I was about to write the same thing earlier, except I stopped when I realized
I also had no idea why mv88e6xxx_mac_select_pcs() returns ERR_PTR(-EOPNOTSUPP).

The removal of using_mac_select_pcs is "further work", and deleting
dsa_port_phylink_mac_select_pcs() altogether, although it can also be
done now, can be grouped with that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ