Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-18 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Mar 2021 04:42:53 +0100 you wrote: > __dev_alloc_name(), when supplied with a name containing '%d', > will search for the first available device number to generate a > unique device name. > > Since commit ff92741270b

Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-18 Thread Andrew Lunn
On Thu, Mar 18, 2021 at 04:42:53AM +0100, Jiri Bohac wrote: > __dev_alloc_name(), when supplied with a name containing '%d', > will search for the first available device number to generate a > unique device name. > > Since commit ff92741270bf8b6e78aa885f166b68c7a67ab13a ("net: > introduce name_nod

Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-18 Thread Stephen Hemminger
On Thu, 18 Mar 2021 10:06:52 +0100 Jiri Bohac wrote: > On Wed, Mar 17, 2021 at 09:11:08PM -0700, Stephen Hemminger wrote: > > Rather than copy/paste same code two places, why not make a helper > > function? > > I tried and in it was ugly (too many dependencies into the > currecnt function) >

Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-18 Thread Jiri Bohac
On Wed, Mar 17, 2021 at 09:11:08PM -0700, Stephen Hemminger wrote: > Rather than copy/paste same code two places, why not make a helper function? I tried and in it was ugly (too many dependencies into the currecnt function) Another option I considered and scratched was to opencode and modify list

Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-18 Thread Jiri Pirko
Thu, Mar 18, 2021 at 04:42:53AM CET, jbo...@suse.cz wrote: >__dev_alloc_name(), when supplied with a name containing '%d', >will search for the first available device number to generate a >unique device name. > >Since commit ff92741270bf8b6e78aa885f166b68c7a67ab13a ("net: >introduce name_node struc

Re: [PATCH] net: check all name nodes in __dev_alloc_name

2021-03-17 Thread Stephen Hemminger
On Thu, 18 Mar 2021 04:42:53 +0100 Jiri Bohac wrote: > for_each_netdev(net, d) { > + struct netdev_name_node *name_node; > + list_for_each_entry(name_node, &d->name_node->list, > list) { > + if (!sscanf(name_node->