summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2009-11-29 22:25:26 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-01 16:15:50 -0800
commitdcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82 (patch)
tree2a2accb2cedfea63ecaafbe1156fc44b4f2acff1 /include
parenta5ee155136b4a8f4ab0e4c9c064b661da475e298 (diff)
downloadlwn-dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82.tar.gz
lwn-dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82.zip
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: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9428793775a0..daf13d367498 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1112,6 +1112,8 @@ extern rwlock_t dev_base_lock; /* Device list lock */
#define for_each_netdev(net, d) \
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) \
list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_safe(net, d, n) \