All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 3/3] net: phylink: add phylink_sfp_select_interface_speed()
Date: Wed, 9 Jul 2025 16:49:11 +0100	[thread overview]
Message-ID: <aG6Pd8sqgL5rILm-@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAKgT0UdVW6_hewR7zNzMd_h7b_Lm_SHdt72yVhc7cLHcfFxuYQ@mail.gmail.com>

On Wed, Jul 09, 2025 at 08:37:51AM -0700, Alexander Duyck wrote:
> On Wed, Jul 2, 2025 at 12:18 PM Russell King (Oracle)
> <linux@armlinux.org.uk> wrote:
> >
> > On Wed, Jul 02, 2025 at 11:07:52AM -0700, Alexander Duyck wrote:
> > > On Wed, Jul 2, 2025 at 6:37 AM Russell King (Oracle)
> > > <linux@armlinux.org.uk> wrote:
> > > >
> > > > On Wed, Jul 02, 2025 at 03:14:26PM +0200, Maxime Chevallier wrote:
> > > > > On Wed, 02 Jul 2025 10:44:34 +0100
> > > > > "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:
> > > > >
> > > > > > Add phylink_sfp_select_interface_speed() which attempts to select the
> > > > > > SFP interface based on the ethtool speed when autoneg is turned off.
> > > > > > This allows users to turn off autoneg for SFPs that support multiple
> > > > > > interface modes, and have an appropriate interface mode selected.
> > > > > >
> > > > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > >
> > > > > Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> > > > >
> > > > > I don't have any hardware to perform relevant tests on this :(
> > > >
> > > > Me neither, I should've said. I'd like to see a t-b from
> > > > Alexander Duyck who originally had the problem before this is
> > > > merged.
> > >
> > > It will probably be several days before I can get around to testing it
> > > since I am slammed with meetings most of the next two days, then have
> > > a holiday weekend coming up.
> >
> > I, too, have a vacation - from tomorrow for three weeks. I may dip in
> > and out of kernel emails during that period, but it depends what
> > happens each day.
> 
> So I was able to go in and test it. I ended up just running the
> testing in QEMU w/ my patch set that currently enables QSFP support.
> From what I can tell it appears to be mostly working. Before when I
> tried to alter the speed to go from 100G to 50G it wouldn't change.
> After your patch set it appears to change, although I am noticing a
> slight difference from the default config.
> 
> So by default we come up in the 100G w/ the QSFP configuration:
> [root@localhost fbnic]# ethtool enp1s0
> Settings for enp1s0:
>         Supported ports: [  ]
>         Supported link modes:   50000baseCR/Full
>                                 100000baseCR2/Full
>         Supported pause frame use: Symmetric Receive-only
>         Supports auto-negotiation: No
>         Supported FEC modes: RS
>         Advertised link modes:  100000baseCR2/Full
>         Advertised pause frame use: Symmetric Receive-only
>         Advertised auto-negotiation: No
>         Advertised FEC modes: RS
>         Link partner advertised link modes:  100000baseCR2/Full
>         Link partner advertised pause frame use: No
>         Link partner advertised auto-negotiation: No
>         Link partner advertised FEC modes: RS
>         Speed: 100000Mb/s
>         Duplex: Full
>         Auto-negotiation: off
>         Port: Other
>         PHYAD: 0
>         Transceiver: internal
>         Link detected: yes
> 
> I then change the speed to 50G and it links back up after a few
> seconds, however the "Advertised link modes" goes from
> "100000baseCR2/Full" to "Not reported" as shown here:
> [root@localhost fbnic]# ethtool -s enp1s0 speed 50000
> [root@localhost fbnic]# ethtool enp1s0
> Settings for enp1s0:
>         Supported ports: [  ]
>         Supported link modes:   50000baseCR/Full
>                                 100000baseCR2/Full
>         Supported pause frame use: Symmetric Receive-only
>         Supports auto-negotiation: No
>         Supported FEC modes: RS
>         Advertised link modes:  Not reported
>         Advertised pause frame use: Symmetric Receive-only
>         Advertised auto-negotiation: No
>         Advertised FEC modes: RS
>         Link partner advertised link modes:  100000baseCR2/Full
>         Link partner advertised pause frame use: No
>         Link partner advertised auto-negotiation: No
>         Link partner advertised FEC modes: RS
>         Speed: 50000Mb/s
>         Duplex: Full
>         Auto-negotiation: off
>         Port: Other
>         PHYAD: 0
>         Transceiver: internal
>         Link detected: yes
> 
> So all-in-all it is an improvement over the previous behavior although
> there may still need to be some work done to improve the consistency
> so that it more closely matches up with what happens when you
> initially configure the interface.

Likely, it's ethtool doing that. Autoneg-off (fixed speed) modes
generally don't have an advertisement. I suggest you debug at UAPI
level.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2025-07-09 15:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02  9:44 [PATCH net-next 0/3] net: phylink: support !autoneg configuration for SFPs Russell King (Oracle)
2025-07-02  9:44 ` [PATCH net-next 1/3] net: phylink: restrict SFP interfaces to those that are supported Russell King (Oracle)
2025-07-02 13:11   ` Maxime Chevallier
2025-07-02  9:44 ` [PATCH net-next 2/3] net: phylink: clear SFP interfaces when not in use Russell King (Oracle)
2025-07-02 13:12   ` Maxime Chevallier
2025-07-02  9:44 ` [PATCH net-next 3/3] net: phylink: add phylink_sfp_select_interface_speed() Russell King (Oracle)
2025-07-02 13:14   ` Maxime Chevallier
2025-07-02 13:37     ` Russell King (Oracle)
2025-07-02 18:07       ` Alexander Duyck
2025-07-02 19:17         ` Russell King (Oracle)
2025-07-09 15:37           ` Alexander Duyck
2025-07-09 15:49             ` Russell King (Oracle) [this message]
2025-07-09 17:40               ` Alexander Duyck
2025-07-09 15:54             ` Andrew Lunn
2025-07-10 17:22               ` Alexander Duyck
2025-07-10 18:35                 ` Russell King (Oracle)
2025-07-10 20:44                   ` Alexander Duyck
2025-07-08  2:10 ` [PATCH net-next 0/3] net: phylink: support !autoneg configuration for SFPs patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aG6Pd8sqgL5rILm-@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.