diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-11-29 17:25:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-01 19:15:50 -0500 |
commit | dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82 (patch) | |
tree | 2a2accb2cedfea63ecaafbe1156fc44b4f2acff1 /include/linux/netdevice.h | |
parent | a5ee155136b4a8f4ab0e4c9c064b661da475e298 (diff) |
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/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
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 */ | |||
1112 | 1112 | ||
1113 | #define for_each_netdev(net, d) \ | 1113 | #define for_each_netdev(net, d) \ |
1114 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) | 1114 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) |
1115 | #define for_each_netdev_reverse(net, d) \ | ||
1116 | list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list) | ||
1115 | #define for_each_netdev_rcu(net, d) \ | 1117 | #define for_each_netdev_rcu(net, d) \ |
1116 | list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list) | 1118 | list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list) |
1117 | #define for_each_netdev_safe(net, d, n) \ | 1119 | #define for_each_netdev_safe(net, d, n) \ |