Commit dcbccbd4 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

net: Implement for_each_netdev_reverse.

I will need this shortly to implement network namespace shutdown
batching.  For sanity sake network devices should be removed in
the reverse order they were created in.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5ee1551
...@@ -1112,6 +1112,8 @@ extern rwlock_t dev_base_lock; /* Device list lock */ ...@@ -1112,6 +1112,8 @@ extern rwlock_t dev_base_lock; /* Device list lock */
#define for_each_netdev(net, d) \ #define for_each_netdev(net, d) \
list_for_each_entry(d, &(net)->dev_base_head, dev_list) list_for_each_entry(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_reverse(net, d) \
list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_rcu(net, d) \ #define for_each_netdev_rcu(net, d) \
list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list) list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_safe(net, d, n) \ #define for_each_netdev_safe(net, d, n) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment