[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250418090016.01900035@fedora.home>
Date: Fri, 18 Apr 2025 09:00:16 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: davem@...emloft.net, Andrew Lunn <andrew@...n.ch>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Heiner Kallweit
<hkallweit1@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
linux-arm-kernel@...ts.infradead.org, Christophe Leroy
<christophe.leroy@...roup.eu>, Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>, Russell King
<linux@...linux.org.uk>, Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>, Oleksij Rempel
<o.rempel@...gutronix.de>, Simon Horman <horms@...nel.org>, Romain Gantois
<romain.gantois@...tlin.com>, Piergiorgio Beruto
<piergiorgio.beruto@...il.com>
Subject: Re: [PATCH net-next v6 1/2] net: ethtool: Introduce per-PHY DUMP
operations
Hi Paolo,
On Thu, 17 Apr 2025 12:03:43 +0200
Paolo Abeni <pabeni@...hat.com> wrote:
> On 4/15/25 10:51 AM, Maxime Chevallier wrote:
> > +static int ethnl_perphy_dump_all_dev(struct sk_buff *skb,
> > + struct ethnl_perphy_dump_ctx *ctx,
> > + const struct genl_info *info)
> > +{
> > + struct ethnl_dump_ctx *ethnl_ctx = &ctx->ethnl_ctx;
> > + struct net *net = sock_net(skb->sk);
> > + struct net_device *dev;
> > + int ret = 0;
> > +
> > + rcu_read_lock();
> > + for_each_netdev_dump(net, dev, ethnl_ctx->pos_ifindex) {
> > + dev_hold(dev);
>
> Minor nit: please use netdev_hold() instead.
Will do, I didn't see the notice about using netdev_hold instead in the
doc, I merely used the current ethnl_default_dumpit() as a reference,
and it uses dev_hold() as well.
should I convert it to netdev_hold() along the way in v3 ?
Maxime
Powered by blists - more mailing lists