From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
"Andrew Lunn" <andrew@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Herve Codina" <herve.codina@bootlin.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Köry Maincent" <kory.maincent@bootlin.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Marek Behún" <kabel@kernel.org>,
"Piergiorgio Beruto" <piergiorgio.beruto@gmail.com>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Nicolò Veronese" <nicveronese@gmail.com>,
"Simon Horman" <horms@kernel.org>
Subject: Re: [PATCH ethtool-next v2 3/3] ethtool: Introduce a command to list PHYs
Date: Wed, 4 Sep 2024 19:47:17 +0200 [thread overview]
Message-ID: <20240904194717.60ba4df6@fedora.home> (raw)
In-Reply-To: <7fpbxztptolcuz4ppppkmpmblel7mv4nh4jgkjqbdedo4hrcjc@6oo6acqfejas>
Hello Michal,
On Mon, 2 Sep 2024 00:07:56 +0200
Michal Kubecek <mkubecek@suse.cz> wrote:
> On Wed, Aug 28, 2024 at 05:25:10PM +0200, Maxime Chevallier wrote:
> > It is now possible to list all Ethernet PHYs that are present behind a
> > given interface, since the following linux commit :
> > 63d5eaf35ac3 ("net: ethtool: Introduce a command to list PHYs on an interface")
> >
> > This command relies on the netlink DUMP command to list them, by allowing to
> > pass an interface name/id as a parameter in the DUMP request to only
> > list PHYs on one interface.
> >
> > Therefore, we introduce a new helper function to prepare a interface-filtered
> > dump request (the filter can be empty, to perform an unfiltered dump),
> > and then uses it to implement PHY enumeration through the --show-phys
> > command.
> >
> > Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> > ---
> [...]
> > diff --git a/netlink/extapi.h b/netlink/extapi.h
> > index c882295..fd99610 100644
> > --- a/netlink/extapi.h
> > +++ b/netlink/extapi.h
> > @@ -56,6 +56,7 @@ int nl_set_mm(struct cmd_context *ctx);
> > int nl_gpse(struct cmd_context *ctx);
> > int nl_spse(struct cmd_context *ctx);
> > int nl_flash_module_fw(struct cmd_context *ctx);
> > +int nl_get_phy(struct cmd_context *ctx);
> >
> > void nl_monitor_usage(void);
> >
>
> Please add also a fallback to !ETHTOOL_ENABLE_NETLINK branch, similar
> to other netlink handlers, so that a build with --disable-netlink does
> not fail.
You're right, I'll add a fallback for that. I actually just faced that
exact issue trying to build this patchset using a fresh buildroot
setup, having forgotten to add netlink libraries.
Thanks for the reviews,
Maxime
prev parent reply other threads:[~2024-09-04 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 15:25 [PATCH ethtool-next v2 0/3] Introduce PHY listing and targeting Maxime Chevallier
2024-08-28 15:25 ` [PATCH ethtool-next v2 1/3] update UAPI header copies Maxime Chevallier
2024-08-28 15:25 ` [PATCH ethtool-next v2 2/3] ethtool: Allow passing a PHY index for phy-targetting commands Maxime Chevallier
2024-09-01 22:04 ` Michal Kubecek
2024-09-04 17:45 ` Maxime Chevallier
2024-08-28 15:25 ` [PATCH ethtool-next v2 3/3] ethtool: Introduce a command to list PHYs Maxime Chevallier
2024-09-01 22:07 ` Michal Kubecek
2024-09-04 17:47 ` 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=20240904194717.60ba4df6@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=herve.codina@bootlin.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kabel@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=nicveronese@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=piergiorgio.beruto@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.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