diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 18:50:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-25 18:50:32 -0400 |
commit | 06dbbfef8296d6dc23e5d8030a0e8e7b20df3b7c (patch) | |
tree | 9f93c1a56082d80e5741bb2a231e93314efbcd7e /net/core | |
parent | 22fa8d59be28affbecc6ae87abf528aebeebff24 (diff) | |
parent | 03cf786c4e83dba404ad23ca58f49147ae52dffd (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV4]: Explicitly call fib_get_table() in fib_frontend.c
[NET]: Use BUILD_BUG_ON in net/core/flowi.c
[NET]: Remove in-code externs for some functions from net/core/dev.c
[NET]: Don't declare extern variables in net/core/sysctl_net_core.c
[TCP]: Remove unneeded implicit type cast when calling tcp_minshall_update()
[NET]: Treat the sign of the result of skb_headroom() consistently
[9P]: Fix missing unlock before return in p9_mux_poll_start
[PKT_SCHED]: Fix sch_prio.c build with CONFIG_NETDEVICES_MULTIQUEUE
[IPV4] ip_gre: sendto/recvfrom NBMA address
[SCTP]: Consolidate sctp_ulpq_renege_xxx functions
[NETLINK]: Fix ACK processing after netlink_dump_start
[VLAN]: MAINTAINERS update
[DCCP]: Implement SIOCINQ/FIONREAD
[NET]: Validate device addr prior to interface-up
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 20 | ||||
-rw-r--r-- | net/core/flow.c | 5 | ||||
-rw-r--r-- | net/core/net-sysfs.c | 2 | ||||
-rw-r--r-- | net/core/net-sysfs.h | 8 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 17 |
5 files changed, 24 insertions, 28 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 872658927e47..f1647d7dd14b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -120,6 +120,8 @@ | |||
120 | #include <linux/ctype.h> | 120 | #include <linux/ctype.h> |
121 | #include <linux/if_arp.h> | 121 | #include <linux/if_arp.h> |
122 | 122 | ||
123 | #include "net-sysfs.h" | ||
124 | |||
123 | /* | 125 | /* |
124 | * The list of packet types we will receive (as opposed to discard) | 126 | * The list of packet types we will receive (as opposed to discard) |
125 | * and the routines to invoke. | 127 | * and the routines to invoke. |
@@ -249,10 +251,6 @@ static RAW_NOTIFIER_HEAD(netdev_chain); | |||
249 | 251 | ||
250 | DEFINE_PER_CPU(struct softnet_data, softnet_data); | 252 | DEFINE_PER_CPU(struct softnet_data, softnet_data); |
251 | 253 | ||
252 | extern int netdev_kobject_init(void); | ||
253 | extern int netdev_register_kobject(struct net_device *); | ||
254 | extern void netdev_unregister_kobject(struct net_device *); | ||
255 | |||
256 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 254 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
257 | /* | 255 | /* |
258 | * register_netdevice() inits dev->_xmit_lock and sets lockdep class | 256 | * register_netdevice() inits dev->_xmit_lock and sets lockdep class |
@@ -1007,17 +1005,20 @@ int dev_open(struct net_device *dev) | |||
1007 | * Call device private open method | 1005 | * Call device private open method |
1008 | */ | 1006 | */ |
1009 | set_bit(__LINK_STATE_START, &dev->state); | 1007 | set_bit(__LINK_STATE_START, &dev->state); |
1010 | if (dev->open) { | 1008 | |
1009 | if (dev->validate_addr) | ||
1010 | ret = dev->validate_addr(dev); | ||
1011 | |||
1012 | if (!ret && dev->open) | ||
1011 | ret = dev->open(dev); | 1013 | ret = dev->open(dev); |
1012 | if (ret) | ||
1013 | clear_bit(__LINK_STATE_START, &dev->state); | ||
1014 | } | ||
1015 | 1014 | ||
1016 | /* | 1015 | /* |
1017 | * If it went open OK then: | 1016 | * If it went open OK then: |
1018 | */ | 1017 | */ |
1019 | 1018 | ||
1020 | if (!ret) { | 1019 | if (ret) |
1020 | clear_bit(__LINK_STATE_START, &dev->state); | ||
1021 | else { | ||
1021 | /* | 1022 | /* |
1022 | * Set the flags. | 1023 | * Set the flags. |
1023 | */ | 1024 | */ |
@@ -1038,6 +1039,7 @@ int dev_open(struct net_device *dev) | |||
1038 | */ | 1039 | */ |
1039 | call_netdevice_notifiers(NETDEV_UP, dev); | 1040 | call_netdevice_notifiers(NETDEV_UP, dev); |
1040 | } | 1041 | } |
1042 | |||
1041 | return ret; | 1043 | return ret; |
1042 | } | 1044 | } |
1043 | 1045 | ||
diff --git a/net/core/flow.c b/net/core/flow.c index 0ab5234b17d8..3ed2b4b1d6d4 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -142,8 +142,6 @@ typedef u64 flow_compare_t; | |||
142 | typedef u32 flow_compare_t; | 142 | typedef u32 flow_compare_t; |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | extern void flowi_is_missized(void); | ||
146 | |||
147 | /* I hear what you're saying, use memcmp. But memcmp cannot make | 145 | /* I hear what you're saying, use memcmp. But memcmp cannot make |
148 | * important assumptions that we can here, such as alignment and | 146 | * important assumptions that we can here, such as alignment and |
149 | * constant size. | 147 | * constant size. |
@@ -153,8 +151,7 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2) | |||
153 | flow_compare_t *k1, *k1_lim, *k2; | 151 | flow_compare_t *k1, *k1_lim, *k2; |
154 | const int n_elem = sizeof(struct flowi) / sizeof(flow_compare_t); | 152 | const int n_elem = sizeof(struct flowi) / sizeof(flow_compare_t); |
155 | 153 | ||
156 | if (sizeof(struct flowi) % sizeof(flow_compare_t)) | 154 | BUILD_BUG_ON(sizeof(struct flowi) % sizeof(flow_compare_t)); |
157 | flowi_is_missized(); | ||
158 | 155 | ||
159 | k1 = (flow_compare_t *) key1; | 156 | k1 = (flow_compare_t *) key1; |
160 | k1_lim = k1 + n_elem; | 157 | k1_lim = k1 + n_elem; |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 6628e457ddc0..61ead1d11132 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/wireless.h> | 18 | #include <linux/wireless.h> |
19 | #include <net/iw_handler.h> | 19 | #include <net/iw_handler.h> |
20 | 20 | ||
21 | #include "net-sysfs.h" | ||
22 | |||
21 | #ifdef CONFIG_SYSFS | 23 | #ifdef CONFIG_SYSFS |
22 | static const char fmt_hex[] = "%#x\n"; | 24 | static const char fmt_hex[] = "%#x\n"; |
23 | static const char fmt_long_hex[] = "%#lx\n"; | 25 | static const char fmt_long_hex[] = "%#lx\n"; |
diff --git a/net/core/net-sysfs.h b/net/core/net-sysfs.h new file mode 100644 index 000000000000..f5f108db3924 --- /dev/null +++ b/net/core/net-sysfs.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __NET_SYSFS_H__ | ||
2 | #define __NET_SYSFS_H__ | ||
3 | |||
4 | int netdev_kobject_init(void); | ||
5 | int netdev_register_kobject(struct net_device *); | ||
6 | void netdev_unregister_kobject(struct net_device *); | ||
7 | |||
8 | #endif | ||
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 6d5ea9762040..113cc728dc31 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -9,25 +9,12 @@ | |||
9 | #include <linux/sysctl.h> | 9 | #include <linux/sysctl.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/netdevice.h> | ||
12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
14 | #include <net/xfrm.h> | ||
13 | 15 | ||
14 | #ifdef CONFIG_SYSCTL | 16 | #ifdef CONFIG_SYSCTL |
15 | 17 | ||
16 | extern int netdev_max_backlog; | ||
17 | extern int weight_p; | ||
18 | |||
19 | extern __u32 sysctl_wmem_max; | ||
20 | extern __u32 sysctl_rmem_max; | ||
21 | |||
22 | extern int sysctl_core_destroy_delay; | ||
23 | |||
24 | #ifdef CONFIG_XFRM | ||
25 | extern u32 sysctl_xfrm_aevent_etime; | ||
26 | extern u32 sysctl_xfrm_aevent_rseqth; | ||
27 | extern int sysctl_xfrm_larval_drop; | ||
28 | extern u32 sysctl_xfrm_acq_expires; | ||
29 | #endif | ||
30 | |||
31 | ctl_table core_table[] = { | 18 | ctl_table core_table[] = { |
32 | #ifdef CONFIG_NET | 19 | #ifdef CONFIG_NET |
33 | { | 20 | { |