diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ax25.h | 4 | ||||
-rw-r--r-- | include/net/dn_route.h | 5 | ||||
-rw-r--r-- | include/net/dst.h | 15 | ||||
-rw-r--r-- | include/net/ip6_fib.h | 1 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 6 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_expect.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l3proto.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l4proto.h | 2 | ||||
-rw-r--r-- | include/net/netrom.h | 4 | ||||
-rw-r--r-- | include/net/rose.h | 6 | ||||
-rw-r--r-- | include/net/route.h | 7 |
11 files changed, 32 insertions, 24 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 5ae10dd2e32e..47ff2f46e908 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -377,7 +377,7 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); | |||
377 | /* ax25_route.c */ | 377 | /* ax25_route.c */ |
378 | extern void ax25_rt_device_down(struct net_device *); | 378 | extern void ax25_rt_device_down(struct net_device *); |
379 | extern int ax25_rt_ioctl(unsigned int, void __user *); | 379 | extern int ax25_rt_ioctl(unsigned int, void __user *); |
380 | extern struct file_operations ax25_route_fops; | 380 | extern const struct file_operations ax25_route_fops; |
381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); | 381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); |
382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); | 382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); |
383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); | 383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); |
@@ -430,7 +430,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
430 | extern int ax25_uid_policy; | 430 | extern int ax25_uid_policy; |
431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
433 | extern struct file_operations ax25_uid_fops; | 433 | extern const struct file_operations ax25_uid_fops; |
434 | extern void ax25_uid_free(void); | 434 | extern void ax25_uid_free(void); |
435 | 435 | ||
436 | /* sysctl_net_ax25.c */ | 436 | /* sysctl_net_ax25.c */ |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index 76f957e258b0..a566944c4962 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay); | |||
68 | struct dn_route { | 68 | struct dn_route { |
69 | union { | 69 | union { |
70 | struct dst_entry dst; | 70 | struct dst_entry dst; |
71 | struct dn_route *rt_next; | ||
72 | } u; | 71 | } u; |
73 | 72 | ||
73 | struct flowi fl; | ||
74 | |||
74 | __le16 rt_saddr; | 75 | __le16 rt_saddr; |
75 | __le16 rt_daddr; | 76 | __le16 rt_daddr; |
76 | __le16 rt_gateway; | 77 | __le16 rt_gateway; |
@@ -80,8 +81,6 @@ struct dn_route { | |||
80 | 81 | ||
81 | unsigned rt_flags; | 82 | unsigned rt_flags; |
82 | unsigned rt_type; | 83 | unsigned rt_type; |
83 | |||
84 | struct flowi fl; | ||
85 | }; | 84 | }; |
86 | 85 | ||
87 | extern void dn_route_init(void); | 86 | extern void dn_route_init(void); |
diff --git a/include/net/dst.h b/include/net/dst.h index 62b7e7598e9a..e12a8ce0b9b3 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -37,9 +37,7 @@ struct sk_buff; | |||
37 | 37 | ||
38 | struct dst_entry | 38 | struct dst_entry |
39 | { | 39 | { |
40 | struct dst_entry *next; | 40 | struct rcu_head rcu_head; |
41 | atomic_t __refcnt; /* client references */ | ||
42 | int __use; | ||
43 | struct dst_entry *child; | 41 | struct dst_entry *child; |
44 | struct net_device *dev; | 42 | struct net_device *dev; |
45 | short error; | 43 | short error; |
@@ -50,7 +48,6 @@ struct dst_entry | |||
50 | #define DST_NOPOLICY 4 | 48 | #define DST_NOPOLICY 4 |
51 | #define DST_NOHASH 8 | 49 | #define DST_NOHASH 8 |
52 | #define DST_BALANCED 0x10 | 50 | #define DST_BALANCED 0x10 |
53 | unsigned long lastuse; | ||
54 | unsigned long expires; | 51 | unsigned long expires; |
55 | 52 | ||
56 | unsigned short header_len; /* more space at head required */ | 53 | unsigned short header_len; /* more space at head required */ |
@@ -75,8 +72,16 @@ struct dst_entry | |||
75 | #endif | 72 | #endif |
76 | 73 | ||
77 | struct dst_ops *ops; | 74 | struct dst_ops *ops; |
78 | struct rcu_head rcu_head; | ||
79 | 75 | ||
76 | unsigned long lastuse; | ||
77 | atomic_t __refcnt; /* client references */ | ||
78 | int __use; | ||
79 | union { | ||
80 | struct dst_entry *next; | ||
81 | struct rtable *rt_next; | ||
82 | struct rt6_info *rt6_next; | ||
83 | struct dn_route *dn_next; | ||
84 | }; | ||
80 | char info[0]; | 85 | char info[0]; |
81 | }; | 86 | }; |
82 | 87 | ||
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7be4f4e3a0f2..9eda572a2a65 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -83,7 +83,6 @@ struct rt6_info | |||
83 | { | 83 | { |
84 | union { | 84 | union { |
85 | struct dst_entry dst; | 85 | struct dst_entry dst; |
86 | struct rt6_info *next; | ||
87 | } u; | 86 | } u; |
88 | 87 | ||
89 | struct inet6_dev *rt6i_idev; | 88 | struct inet6_dev *rt6i_idev; |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 68ec27490c20..0e690e34c00b 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -257,6 +257,12 @@ extern int nf_conntrack_max; | |||
257 | 257 | ||
258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); |
259 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) | 259 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) |
260 | #define NF_CT_STAT_INC_ATOMIC(count) \ | ||
261 | do { \ | ||
262 | local_bh_disable(); \ | ||
263 | __get_cpu_var(nf_conntrack_stat).count++; \ | ||
264 | local_bh_enable(); \ | ||
265 | } while (0) | ||
260 | 266 | ||
261 | /* no helper, no nat */ | 267 | /* no helper, no nat */ |
262 | #define NF_CT_F_BASIC 0 | 268 | #define NF_CT_F_BASIC 0 |
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index 41bcc9eb4206..173c7c1eff23 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | extern struct list_head nf_conntrack_expect_list; | 9 | extern struct list_head nf_conntrack_expect_list; |
10 | extern struct kmem_cache *nf_conntrack_expect_cachep; | 10 | extern struct kmem_cache *nf_conntrack_expect_cachep; |
11 | extern struct file_operations exp_file_ops; | 11 | extern const struct file_operations exp_file_ops; |
12 | 12 | ||
13 | struct nf_conntrack_expect | 13 | struct nf_conntrack_expect |
14 | { | 14 | { |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 664ddcffe00d..eb575cbd4c95 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
89 | 89 | ||
90 | /* Protocol registration. */ | 90 | /* Protocol registration. */ |
91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
92 | extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 92 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
93 | 93 | ||
94 | extern struct nf_conntrack_l3proto * | 94 | extern struct nf_conntrack_l3proto * |
95 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 95 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
@@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto) | |||
106 | { | 106 | { |
107 | if (unlikely(l3proto >= AF_MAX)) | 107 | if (unlikely(l3proto >= AF_MAX)) |
108 | return &nf_conntrack_l3proto_generic; | 108 | return &nf_conntrack_l3proto_generic; |
109 | return nf_ct_l3protos[l3proto]; | 109 | return rcu_dereference(nf_ct_l3protos[l3proto]); |
110 | } | 110 | } |
111 | 111 | ||
112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index fc8af08ff542..8415182ec126 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); | |||
109 | 109 | ||
110 | /* Protocol registration. */ | 110 | /* Protocol registration. */ |
111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); | 111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); |
112 | extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); | 112 | extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); |
113 | 113 | ||
114 | /* Generic netlink helpers */ | 114 | /* Generic netlink helpers */ |
115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, | 115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, |
diff --git a/include/net/netrom.h b/include/net/netrom.h index e0ca112024a3..f06852bba62a 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -215,8 +215,8 @@ extern struct net_device *nr_dev_get(ax25_address *); | |||
215 | extern int nr_rt_ioctl(unsigned int, void __user *); | 215 | extern int nr_rt_ioctl(unsigned int, void __user *); |
216 | extern void nr_link_failed(ax25_cb *, int); | 216 | extern void nr_link_failed(ax25_cb *, int); |
217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); | 217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); |
218 | extern struct file_operations nr_nodes_fops; | 218 | extern const struct file_operations nr_nodes_fops; |
219 | extern struct file_operations nr_neigh_fops; | 219 | extern const struct file_operations nr_neigh_fops; |
220 | extern void nr_rt_free(void); | 220 | extern void nr_rt_free(void); |
221 | 221 | ||
222 | /* nr_subr.c */ | 222 | /* nr_subr.c */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 4c05a88b921b..a4047d3cf5dd 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -189,9 +189,9 @@ extern void rose_enquiry_response(struct sock *); | |||
189 | 189 | ||
190 | /* rose_route.c */ | 190 | /* rose_route.c */ |
191 | extern struct rose_neigh rose_loopback_neigh; | 191 | extern struct rose_neigh rose_loopback_neigh; |
192 | extern struct file_operations rose_neigh_fops; | 192 | extern const struct file_operations rose_neigh_fops; |
193 | extern struct file_operations rose_nodes_fops; | 193 | extern const struct file_operations rose_nodes_fops; |
194 | extern struct file_operations rose_routes_fops; | 194 | extern const struct file_operations rose_routes_fops; |
195 | 195 | ||
196 | extern void rose_add_loopback_neigh(void); | 196 | extern void rose_add_loopback_neigh(void); |
197 | extern int __must_check rose_add_loopback_node(rose_address *); | 197 | extern int __must_check rose_add_loopback_node(rose_address *); |
diff --git a/include/net/route.h b/include/net/route.h index 1440bdb5a27d..749e4dfe5ff3 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -53,9 +53,11 @@ struct rtable | |||
53 | union | 53 | union |
54 | { | 54 | { |
55 | struct dst_entry dst; | 55 | struct dst_entry dst; |
56 | struct rtable *rt_next; | ||
57 | } u; | 56 | } u; |
58 | 57 | ||
58 | /* Cache lookup keys */ | ||
59 | struct flowi fl; | ||
60 | |||
59 | struct in_device *idev; | 61 | struct in_device *idev; |
60 | 62 | ||
61 | unsigned rt_flags; | 63 | unsigned rt_flags; |
@@ -69,9 +71,6 @@ struct rtable | |||
69 | /* Info on neighbour */ | 71 | /* Info on neighbour */ |
70 | __be32 rt_gateway; | 72 | __be32 rt_gateway; |
71 | 73 | ||
72 | /* Cache lookup keys */ | ||
73 | struct flowi fl; | ||
74 | |||
75 | /* Miscellaneous cached information */ | 74 | /* Miscellaneous cached information */ |
76 | __be32 rt_spec_dst; /* RFC1122 specific destination */ | 75 | __be32 rt_spec_dst; /* RFC1122 specific destination */ |
77 | struct inet_peer *peer; /* long-living peer info */ | 76 | struct inet_peer *peer; /* long-living peer info */ |