mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Daniel Golle <daniel@makrotopia.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Kory Maincent <kory.maincent@bootlin.com>,
	Edward Cree <ecree.xilinx@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	John Crispin <john@phrozen.org>
Subject: Re: ethtool settings and SFP modules with PHYs
Date: Mon, 16 Sep 2024 18:03:35 +0200	[thread overview]
Message-ID: <ebfeeabd-7f4a-4a80-ba76-561711a9d776@lunn.ch> (raw)
In-Reply-To: <ZuhQjx2137ZC_DCz@makrotopia.org>

On Mon, Sep 16, 2024 at 04:36:47PM +0100, Daniel Golle wrote:
> Hi,
> 
> I'm wondering how (or rahter: when?) one is supposed to apply ethtool
> settings, such as modifying advertisement of speed, duplex, ..., with
> SFP modules containing a PHY.

It should actually be more generic than that. You might also want to
change the settings for Fibre modules. You have a 2.5G capable module
and MAC, but the link partner can only do 1G. You need to force it
down to 1G in order to get link.

> Do you think it would make sense to keep the user selection of
> advertised modes for each networking device accross removal or insertion
> of an SFP module?

No, you have no idea if the same module has been inserted, at least
with the current code. You could maybe stash the EEPROM contents and
see if it is the same, but that does not seem reliable to me, what do
you do when it is different?

> Alternatively we could of course also introduce a dedicated NETLINK_ROUTE
> event which fires exactly one time once a new is PHY attached.

Something like that. I would probably also do it on remove.

It does not seem too unreasonable to call netdev_state_change() on
module insert/remove. But maybe also add an additional property
indicating if the SFP cage is empty/occupied. The plumbing for that is
a bit more interesting.

	Andrew


  parent reply	other threads:[~2024-09-16 16:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 15:36 Daniel Golle
2024-09-16 16:02 ` Maxime Chevallier
2024-09-16 16:12   ` Andrew Lunn
2024-09-16 16:29     ` Maxime Chevallier
2024-09-16 16:03 ` Andrew Lunn [this message]
2024-09-16 17:34   ` Russell King (Oracle)
2024-09-17 15:53     ` Maxime Chevallier
2024-09-17 16:38       ` Russell King (Oracle)
2024-09-17 17:16         ` Daniel Golle

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=ebfeeabd-7f4a-4a80-ba76-561711a9d776@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=john@phrozen.org \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®