[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250211-discerning-greedy-nuthatch-b20c4b@leitao>
Date: Tue, 11 Feb 2025 03:36:43 -0800
From: Breno Leitao <leitao@...ian.org>
To: Uday Shankar <ushankar@...estorage.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, kernel-team@...a.com, kuniyu@...zon.com
Subject: Re: [PATCH net-next v2 2/2] net: Add dev_getbyhwaddr_rtnl() helper
Hello Uday,
On Tue, Feb 11, 2025 at 01:10:01AM -0700, Uday Shankar wrote:
> On Mon, Feb 10, 2025 at 03:56:14AM -0800, Breno Leitao wrote:
> > +/**
> > + * dev_getbyhwaddr - find a device by its hardware address
> > + * @net: the applicable net namespace
> > + * @type: media type of device
> > + * @ha: hardware address
> > + *
> > + * Similar to dev_getbyhwaddr_rcu(), but the owner needs to hold
> > + * rtnl_lock.
> > + *
> > + * Return: pointer to the net_device, or NULL if not found
> > + */
> > +struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type,
> > + const char *ha)
> > +{
> > + struct net_device *dev;
> > +
> > + ASSERT_RTNL();
> > + for_each_netdev(net, dev)
> > + if (dev_comp_addr(dev, type, ha))
> > + return dev;
> > +
> > + return NULL;
> > +}
> > +EXPORT_SYMBOL(dev_getbyhwaddr);
>
> Commit title should change to reflect the new function name in v2.
>
> Separately - how should I combine this with
> https://lore.kernel.org/netdev/20250205-netconsole-v3-0-132a31f17199@purestorage.com/?
> I see three options:
> - combine the two series into one
I would suggest you combine the two series into one.
I will send a v3 today adjusting the comments, and you can integrated
them into your patchset.
Thanks
--breno
Powered by blists - more mailing lists