From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
linux-arm-msm@vger.kernel.org, "Marek Behún" <kabel@kernel.org>,
netdev@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>
Subject: Re: [PATCH net-next v2 0/7] net: rework SFP capability parsing and quirks
Date: Wed, 24 Sep 2025 12:12:17 +0530 [thread overview]
Message-ID: <b67b9041-71ac-4e60-86fc-9d59329719cf@bootlin.com> (raw)
In-Reply-To: <aMnaoPjIuzEAsESZ@shell.armlinux.org.uk>
Hi Russell,
On 17/09/2025 03:16, Russell King (Oracle) wrote:
> The original SPF module parsing was implemented prior to gaining any
> quirks, and was designed such that the upstream calls the parsing
> functions to get the translated capabilities of the module.
>
> SFP quirks were then added to cope with modules that didn't correctly
> fill out their ID EEPROM. The quirk function was called from
> sfp_parse_support() to allow quirks to modify the ethtool link mode
> masks.
>
> Using just ethtool link mode masks eventually lead to difficulties
> determining the correct phy_interface_t mode, so a bitmap of these
> modes were added - needing both the upstream API and quirks to be
> updated.
>
> We have had significantly more SFP module quirks added since, some
> which are modifying the ID EEPROM as a way of influencing the data
> we provide to the upstream - for example, sfp_fixup_10gbaset_30m()
> changes id.base.connector so we report PORT_TP. This could be done
> more cleanly if the quirks had access to the parsed SFP port.
>
> In order to improve flexibility, and to simplify some of the upstream
> code, we group all module capabilities into a single structure that
> the upstream can access via sfp_module_get_caps(). This will allow
> the module capabilities to be expanded if required without reworking
> all the infrastructure and upstreams again.
>
> In this series, we rework the SFP code to use the capability structure
> and then rework all the upstream implementations, finally removing the
> old kernel internal APIs.
>
That's some nice work !
I however would have like to be in CC for that, and to have gotten the
information that you were working on that.
You commented on the phy_port V10 that we were moving away from
sfp_select_interface() and at the time, I asked if the approach I was
considering for phy_port was correct or not [1].
Without any reply from you I move on and implemented some reworks in the
phy_port series, without comments from you on V11/12/13, only to find out
now that this whole thing I've added since v10 to come-up with generic
interface selection on PHY driver SFP is superseded by that work.
While your approach is definitely better, I'd have appreciated a heads-up
that you were working on that, or even be in CC: for that work, as I'm
having very limited availabilities to parse the full netdev list :(
In any case, this will make the phy_port series simpler, so thanks for
that work
[1] : https://lore.kernel.org/netdev/a30d00cd-9148-423b-a3e5-b11d6c5c270b@bootlin.com/
Maxime
> ---
prev parent reply other threads:[~2025-09-24 6:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 21:46 [PATCH net-next v2 0/7] net: rework SFP capability parsing and quirks Russell King (Oracle)
2025-09-16 21:46 ` [PATCH net-next 1/7] net: phy: add phy_interface_copy() Russell King (Oracle)
2025-09-16 21:46 ` [PATCH net-next 2/7] net: sfp: pre-parse the module support Russell King (Oracle)
2025-09-16 21:46 ` [PATCH net-next 3/7] net: sfp: convert sfp quirks to modify struct sfp_module_support Russell King (Oracle)
2025-09-16 21:46 ` [PATCH net-next 4/7] net: sfp: provide sfp_get_module_caps() Russell King (Oracle)
2025-09-16 21:46 ` [PATCH net-next 5/7] net: phylink: use sfp_get_module_caps() Russell King (Oracle)
2025-09-16 21:47 ` [PATCH net-next 6/7] net: phy: update all PHYs to " Russell King (Oracle)
2025-09-16 21:47 ` [PATCH net-next 7/7] net: sfp: remove old sfp_parse_* functions Russell King (Oracle)
2025-09-18 9:11 ` Paolo Abeni
2025-09-22 23:30 ` [PATCH net-next v2 0/7] net: rework SFP capability parsing and quirks patchwork-bot+netdevbpf
2025-09-24 6:42 ` Maxime Chevallier [this message]
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=b67b9041-71ac-4e60-86fc-9d59329719cf@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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