diff options
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 452f229c380a..890f9725d681 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -61,11 +61,14 @@ struct ipcm_cookie { | |||
61 | struct ip_ra_chain { | 61 | struct ip_ra_chain { |
62 | struct ip_ra_chain *next; | 62 | struct ip_ra_chain *next; |
63 | struct sock *sk; | 63 | struct sock *sk; |
64 | void (*destructor)(struct sock *); | 64 | union { |
65 | void (*destructor)(struct sock *); | ||
66 | struct sock *saved_sk; | ||
67 | }; | ||
68 | struct rcu_head rcu; | ||
65 | }; | 69 | }; |
66 | 70 | ||
67 | extern struct ip_ra_chain *ip_ra_chain; | 71 | extern struct ip_ra_chain *ip_ra_chain; |
68 | extern rwlock_t ip_ra_lock; | ||
69 | 72 | ||
70 | /* IP flags. */ | 73 | /* IP flags. */ |
71 | #define IP_CE 0x8000 /* Flag: "Congestion" */ | 74 | #define IP_CE 0x8000 /* Flag: "Congestion" */ |
@@ -162,12 +165,12 @@ struct ipv4_config { | |||
162 | }; | 165 | }; |
163 | 166 | ||
164 | extern struct ipv4_config ipv4_config; | 167 | extern struct ipv4_config ipv4_config; |
165 | #define IP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.ip_statistics, field) | 168 | #define IP_INC_STATS(net, field) SNMP_INC_STATS64((net)->mib.ip_statistics, field) |
166 | #define IP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.ip_statistics, field) | 169 | #define IP_INC_STATS_BH(net, field) SNMP_INC_STATS64_BH((net)->mib.ip_statistics, field) |
167 | #define IP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.ip_statistics, field, val) | 170 | #define IP_ADD_STATS(net, field, val) SNMP_ADD_STATS64((net)->mib.ip_statistics, field, val) |
168 | #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH((net)->mib.ip_statistics, field, val) | 171 | #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS64_BH((net)->mib.ip_statistics, field, val) |
169 | #define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS((net)->mib.ip_statistics, field, val) | 172 | #define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS64((net)->mib.ip_statistics, field, val) |
170 | #define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS_BH((net)->mib.ip_statistics, field, val) | 173 | #define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS64_BH((net)->mib.ip_statistics, field, val) |
171 | #define NET_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.net_statistics, field) | 174 | #define NET_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.net_statistics, field) |
172 | #define NET_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.net_statistics, field) | 175 | #define NET_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.net_statistics, field) |
173 | #define NET_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->mib.net_statistics, field) | 176 | #define NET_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->mib.net_statistics, field) |
@@ -175,7 +178,15 @@ extern struct ipv4_config ipv4_config; | |||
175 | #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) | 178 | #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) |
176 | 179 | ||
177 | extern unsigned long snmp_fold_field(void __percpu *mib[], int offt); | 180 | extern unsigned long snmp_fold_field(void __percpu *mib[], int offt); |
178 | extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize); | 181 | #if BITS_PER_LONG==32 |
182 | extern u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off); | ||
183 | #else | ||
184 | static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp_off) | ||
185 | { | ||
186 | return snmp_fold_field(mib, offt); | ||
187 | } | ||
188 | #endif | ||
189 | extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align); | ||
179 | extern void snmp_mib_free(void __percpu *ptr[2]); | 190 | extern void snmp_mib_free(void __percpu *ptr[2]); |
180 | 191 | ||
181 | extern struct local_ports { | 192 | extern struct local_ports { |