From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Simon Horman <horms@kernel.org>
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>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Köry Maincent" <kory.maincent@bootlin.com>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Shuah Khan" <shuah@kernel.org>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: netdevsim: Add PHY support in netdevsim
Date: Fri, 4 Jul 2025 14:46:51 +0200 [thread overview]
Message-ID: <20250704144651.064e3c28@fedora.home> (raw)
In-Reply-To: <20250704124336.GL41770@horms.kernel.org>
Hi Simon,
On Fri, 4 Jul 2025 13:43:36 +0100
Simon Horman <horms@kernel.org> wrote:
> On Wed, Jul 02, 2025 at 10:28:03AM +0200, Maxime Chevallier wrote:
> > With the introduction of phy_link_topology, we have the ability to keep
> > track of PHY devices that sit behind a net_device. While we still can
> > only attach one single PHY to a netdev, we can look at all these PHYs
> > through netlink, with the ETHTOOL_MSG_PHY_GET command.
> >
> > Moreover, netlink commands that are targeting PHY devices also now
> > allow specifying which PHY we want to address in a given netlink
> > command.
> >
> > That whole process comes with its own complexity, and a few bugs were
> > dicovered over the months following the introduction of
>
> Hi Maxime,
>
> As it seems like there will be a v2 anyway: discovered
Thanks :)
> > phy_link_topology.
>
> ...
>
> > +static struct phy_driver nsim_virtual_phy_drv[] = {
> > + {
> > + .name = "Netdevsim virtual PHY driver",
> > + .get_features = nsim_get_features,
> > + .match_phy_device = nsim_match_phy_device,
> > + .config_aneg = nsim_config_aneg,
> > + .read_status = nsim_read_status,
> > + },
> > +};
> > +
> > +module_phy_driver(nsim_virtual_phy_drv);
>
> I see that this has been flagged by Kernel Test Robot,
> but as I had already written most of this it seems worth sending anyway.
>
> I am somewhat guessing at the why here, but
> I see build failures with this patch applied:
>
> ld: drivers/net/netdevsim/phy.o: in function `phy_module_init':
> phy.c:(.init.text+0x0): multiple definition of `init_module'; drivers/net/netdevsim/netdev.o:netdev.c:(.init.text+0x0): first defined here
> ld: drivers/net/netdevsim/phy.o: in function `phy_module_exit':
> phy.c:(.exit.text+0x0): multiple definition of `cleanup_module'; drivers/net/netdevsim/netdev.o:netdev.c:(.exit.text+0x0): first defined here
>
> I am guessing that this is because above module_phy_driver() will define
> init_module and phy_module_exit functions. But the following lines near
> the end of drivers/net/netdevsim/netdev.c also define functions with those
> names.
>
> module_init(nsim_module_init);
> module_exit(nsim_module_exit);
>
> ...
I just received the kernel test robot report indeed :( Thanks for the
investigation ! I'll rework that part, sorry about that :/
Maxime
next prev parent reply other threads:[~2025-07-04 12:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 8:28 [PATCH net-next 0/3] netdevsim: add support for PHY devices Maxime Chevallier
2025-07-02 8:28 ` [PATCH net-next 1/3] net: netdevsim: Add PHY support in netdevsim Maxime Chevallier
2025-07-04 12:17 ` kernel test robot
2025-07-04 12:43 ` Simon Horman
2025-07-04 12:46 ` Maxime Chevallier [this message]
2025-07-08 14:01 ` Andrew Lunn
2025-07-08 14:13 ` Maxime Chevallier
2025-07-02 8:28 ` [PATCH net-next 2/3] selftests: ethtool: Drop the unused old_netdevs variable Maxime Chevallier
2025-07-07 15:22 ` Vladimir Oltean
2025-07-02 8:28 ` [PATCH net-next 3/3] selftests: ethtool: Introduce ethernet PHY selftests on netdevsim Maxime Chevallier
2025-07-04 13:20 ` Simon Horman
2025-07-04 13:32 ` Maxime Chevallier
2025-07-04 16:50 ` Simon Horman
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=20250704144651.064e3c28@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--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
all inboxes | Powered by JetHome®