[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240102162649.lhekve4ufo6yhp6q@skbuf>
Date: Tue, 2 Jan 2024 18:26:49 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH net-next] net: phylink: avoid one unnecessary
phylink_validate() call during phylink_create()
Hello Russell,
On Tue, Jan 02, 2024 at 02:24:17PM +0000, Russell King (Oracle) wrote:
> So... getting back to this as I have platforms I can test with in front
> of me now... On October 5th, you asked by email what the purpose of
> this was. I replied same day, stating the purpose of it, citing mvneta.
> I did state in that email about reporting "absolutely nothing" to
> userspace, but in fact it's the opposite - without this validate()
> call, we report absolutely everything.
>
> With it removed, booting my Armada 388 Clearfog platform with the
> ethernet interface not having been brought up, and then running ethtool
> on it, this is what I get:
>
> Does that look like sensible output for a network interface that can
> only do up to 2.5G speeds to you?
I wish you a happy and healthy new year.
No, it does not look like sensible output to me.
But I have a very simple question. Did you test "with phylink_validate()
removed", or with my patch applied as-is? Because there is a very big
difference between these 2 things. My patch does not intend to change
the behavior, and I have tested it on a mvneta-based system that it does
not. It should not produce the behavior you present above.
Before patch:
[root@mox:~] # ethtool end0
Settings for end0:
Supported ports: [ TP AUI MII FIBRE BNC Backplane ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseKX/Full
1000baseX/Full
100baseT1/Full
1000baseT1/Full
100baseFX/Half 100baseFX/Full
10baseT1L/Full
10baseT1S/Full
10baseT1S/Half 10baseT1S_P2MP/Half
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Half
Auto-negotiation: off
Port: MII
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Link detected: no
[root@mox:~] # ip link set end0 up
[ 105.603188] mvneta d0030000.ethernet end0: PHY [d0032004.mdio-mii:01] driver [Marvell 88E1510] (irq=POLL)
[ 105.615130] mvneta d0030000.ethernet end0: configuring for phy/rgmii-id link mode
[root@mox:~] # [ 108.706615] mvneta d0030000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx
[root@mox:~] # ethtool end0
Settings for end0:
Supported ports: [ TP MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 1
Transceiver: external
MDI-X: Unknown
Supports Wake-on: pg
Wake-on: d
Link detected: yes
After patch:
[root@mox:~] # ethtool end0
Settings for end0:
Supported ports: [ TP AUI MII FIBRE BNC Backplane ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseKX/Full
1000baseX/Full
100baseT1/Full
1000baseT1/Full
100baseFX/Half 100baseFX/Full
10baseT1L/Full
10baseT1S/Full
10baseT1S/Half 10baseT1S_P2MP/Half
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Half
Auto-negotiation: off
Port: MII
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Link detected: no
[root@mox:~] # ip link set end0 up
[ 35.890744] mvneta d0030000.ethernet end0: PHY [d0032004.mdio-mii:01] driver [Marvell 88E1510] (irq=POLL)
[ 35.900834] mvneta d0030000.ethernet end0: configuring for phy/rgmii-id link mode
[root@mox:~] # [ 40.002662] mvneta d0030000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx
[root@mox:~] # ethtool end0
Settings for end0:
Supported ports: [ TP MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 1
Transceiver: external
MDI-X: Unknown
Supports Wake-on: pg
Wake-on: d
Link detected: yes
Putting the "before" and "after" logs through the "meld" program, I see
the result is identical.
Powered by blists - more mailing lists