Lines Matching refs:name_node

242 	struct netdev_name_node *name_node;  in netdev_name_node_alloc()  local
244 name_node = kmalloc(sizeof(*name_node), GFP_KERNEL); in netdev_name_node_alloc()
245 if (!name_node) in netdev_name_node_alloc()
247 INIT_HLIST_NODE(&name_node->hlist); in netdev_name_node_alloc()
248 name_node->dev = dev; in netdev_name_node_alloc()
249 name_node->name = name; in netdev_name_node_alloc()
250 return name_node; in netdev_name_node_alloc()
256 struct netdev_name_node *name_node; in netdev_name_node_head_alloc() local
258 name_node = netdev_name_node_alloc(dev, dev->name); in netdev_name_node_head_alloc()
259 if (!name_node) in netdev_name_node_head_alloc()
261 INIT_LIST_HEAD(&name_node->list); in netdev_name_node_head_alloc()
262 return name_node; in netdev_name_node_head_alloc()
265 static void netdev_name_node_free(struct netdev_name_node *name_node) in netdev_name_node_free() argument
267 kfree(name_node); in netdev_name_node_free()
271 struct netdev_name_node *name_node) in netdev_name_node_add() argument
273 hlist_add_head_rcu(&name_node->hlist, in netdev_name_node_add()
274 dev_name_hash(net, name_node->name)); in netdev_name_node_add()
277 static void netdev_name_node_del(struct netdev_name_node *name_node) in netdev_name_node_del() argument
279 hlist_del_rcu(&name_node->hlist); in netdev_name_node_del()
286 struct netdev_name_node *name_node; in netdev_name_node_lookup() local
288 hlist_for_each_entry(name_node, head, hlist) in netdev_name_node_lookup()
289 if (!strcmp(name_node->name, name)) in netdev_name_node_lookup()
290 return name_node; in netdev_name_node_lookup()
298 struct netdev_name_node *name_node; in netdev_name_node_lookup_rcu() local
300 hlist_for_each_entry_rcu(name_node, head, hlist) in netdev_name_node_lookup_rcu()
301 if (!strcmp(name_node->name, name)) in netdev_name_node_lookup_rcu()
302 return name_node; in netdev_name_node_lookup_rcu()
314 struct netdev_name_node *name_node; in netdev_name_node_alt_create() local
317 name_node = netdev_name_node_lookup(net, name); in netdev_name_node_alt_create()
318 if (name_node) in netdev_name_node_alt_create()
320 name_node = netdev_name_node_alloc(dev, name); in netdev_name_node_alt_create()
321 if (!name_node) in netdev_name_node_alt_create()
323 netdev_name_node_add(net, name_node); in netdev_name_node_alt_create()
325 list_add_tail(&name_node->list, &dev->name_node->list); in netdev_name_node_alt_create()
331 static void __netdev_name_node_alt_destroy(struct netdev_name_node *name_node) in __netdev_name_node_alt_destroy() argument
333 list_del(&name_node->list); in __netdev_name_node_alt_destroy()
334 netdev_name_node_del(name_node); in __netdev_name_node_alt_destroy()
335 kfree(name_node->name); in __netdev_name_node_alt_destroy()
336 netdev_name_node_free(name_node); in __netdev_name_node_alt_destroy()
341 struct netdev_name_node *name_node; in netdev_name_node_alt_destroy() local
344 name_node = netdev_name_node_lookup(net, name); in netdev_name_node_alt_destroy()
345 if (!name_node) in netdev_name_node_alt_destroy()
350 if (name_node == dev->name_node || name_node->dev != dev) in netdev_name_node_alt_destroy()
353 __netdev_name_node_alt_destroy(name_node); in netdev_name_node_alt_destroy()
361 struct netdev_name_node *name_node, *tmp; in netdev_name_node_alt_flush() local
363 list_for_each_entry_safe(name_node, tmp, &dev->name_node->list, list) in netdev_name_node_alt_flush()
364 __netdev_name_node_alt_destroy(name_node); in netdev_name_node_alt_flush()
376 netdev_name_node_add(net, dev->name_node); in list_netdevice()
394 netdev_name_node_del(dev->name_node); in unlist_netdevice()
1114 struct netdev_name_node *name_node; in __dev_alloc_name() local
1115 list_for_each_entry(name_node, &d->name_node->list, list) { in __dev_alloc_name()
1116 if (!sscanf(name_node->name, name, &i)) in __dev_alloc_name()
1123 if (!strncmp(buf, name_node->name, IFNAMSIZ)) in __dev_alloc_name()
1276 netdev_name_node_del(dev->name_node); in dev_change_name()
1282 netdev_name_node_add(net, dev->name_node); in dev_change_name()
10260 dev->name_node = netdev_name_node_head_alloc(dev); in register_netdevice()
10261 if (!dev->name_node) in register_netdevice()
10392 netdev_name_node_free(dev->name_node); in register_netdevice()
11094 netdev_name_node_free(dev->name_node); in unregister_netdevice_many()