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-next>] [day] [month] [year] [list]
Message-Id: <20230311203132.156467-1-klaus.kudielka@gmail.com>
Date:   Sat, 11 Mar 2023 21:31:29 +0100
From:   Klaus Kudielka <klaus.kudielka@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Richard Cochran <richardcochran@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Klaus Kudielka <klaus.kudielka@...il.com>
Subject: [PATCH net-next v2 0/3] net: dsa: mv88e6xxx: accelerate C45 scan

Starting with commit 1a136ca2e089 ("net: mdio: scan bus based on bus
capabilities for C22 and C45"), mdiobus_scan_bus_c45() is being called on
buses with MDIOBUS_NO_CAP. On a Turris Omnia (Armada 385, 88E6176 switch),
this causes a significant increase of boot time, from 1.6 seconds, to 6.3
seconds. The boot time stated here is until start of /init.

Further testing revealed that the C45 scan is indeed expensive (around
2.7 seconds, due to a huge number of bus transactions), and called twice.

Two things were suggested:
(1) to move the expensive call of mv88e6xxx_mdios_register() from
    mv88e6xxx_probe() to mv88e6xxx_setup().
(2) to mask apparently non-existing phys during probing.

With those two changes, boot time on the Turris Omnia is back to normal.

Patch #1 is preparatory code movement, without functional change.
The remaining two patches implement the suggestions above.

Link: https://lore.kernel.org/lkml/449bde236c08d5ab5e54abd73b645d8b29955894.camel@gmail.com/

Changes in v2:
Add cover letter
Extend the cleanup in mv88e6xxx_setup() to remove the mdio bus on failure 
Add separate patch for phy masking

Klaus Kudielka (3):
  net: dsa: mv88e6xxx: re-order functions
  net: dsa: mv88e6xxx: move call to mv88e6xxx_mdios_register()
  net: dsa: mv88e6xxx: mask apparently non-existing phys during probing

 drivers/net/dsa/mv88e6xxx/chip.c | 381 ++++++++++++++++---------------
 1 file changed, 192 insertions(+), 189 deletions(-)

-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ