netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: "Nicolò Veronese" <nicveronese@gmail.com>,
	netdev@vger.kernel.org, simonebortolin@hack-gpon.org,
	nanomad@hack-gpon.org, "Federico Cappon" <dududede371@gmail.com>,
	daniel@makrotopia.org, lorenzo@kernel.org, ftp21@ftp21.eu,
	pierto88@hack-gpon.org, hitech95@hack-gpon.org,
	davem@davemloft.net, andrew@lunn.ch, edumazet@google.com,
	hkallweit1@gmail.com, pabeni@redhat.com, nbd@nbd.name
Subject: Re: [RFC] RJ45 to SFP auto-sensing and switching in mux-ed single-mac devices (XOR RJ/SFP)
Date: Wed, 30 Aug 2023 18:04:37 -0700	[thread overview]
Message-ID: <20230830180437.583e6383@kernel.org> (raw)
In-Reply-To: <ZO4RAtaoNX6d66mb@shell.armlinux.org.uk>

On Tue, 29 Aug 2023 16:38:42 +0100 Russell King (Oracle) wrote:
> So technically it's possible. However, there is no notification to
> userspace when such a change may occur. There's also the issue that
> userspace may be in the process of issuing ethtool commands that are
> affecting one of the PHYs. While holding the rtnl lock will block
> those calls, a change between the PHY and e.g. a PHY on the SFP
> would cause the ethtool command to target a different PHY from what
> was the original target.
> 
> To solve that sanely, every PHY-based ethtool probably needs a way
> to specify which PHY the command is intended for, but then there's
> the question of how userspace users react to that - because it's
> likely more than just modifying the ethtool utility, ethtool
> commands are probably used from many programs.

Would it simplify anything if we only did the selection from ndo_open?
We can send a notification to user space that the SFP got plugged in,
but its up to user space to down / up the interface to use it?

  parent reply	other threads:[~2023-08-31  1:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 15:12 [RFC] RJ45 to SFP auto-sensing and switching in mux-ed single-mac devices (XOR RJ/SFP) Nicolò Veronese
2023-08-29 15:38 ` Russell King (Oracle)
2023-08-29 17:37   ` Daniel Golle
2023-08-29 18:04     ` Russell King (Oracle)
2023-08-31  1:04   ` Jakub Kicinski [this message]
2023-09-03 22:51   ` Andrew Lunn
2023-09-04  6:06     ` Maxime Chevallier

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=20230830180437.583e6383@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dududede371@gmail.com \
    --cc=edumazet@google.com \
    --cc=ftp21@ftp21.eu \
    --cc=hitech95@hack-gpon.org \
    --cc=hkallweit1@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo@kernel.org \
    --cc=nanomad@hack-gpon.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=nicveronese@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pierto88@hack-gpon.org \
    --cc=simonebortolin@hack-gpon.org \
    /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;
as well as URLs for NNTP newsgroup(s).