aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h29
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 {
61struct ip_ra_chain { 61struct 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
67extern struct ip_ra_chain *ip_ra_chain; 71extern struct ip_ra_chain *ip_ra_chain;
68extern 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
164extern struct ipv4_config ipv4_config; 167extern 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
177extern unsigned long snmp_fold_field(void __percpu *mib[], int offt); 180extern unsigned long snmp_fold_field(void __percpu *mib[], int offt);
178extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize); 181#if BITS_PER_LONG==32
182extern u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off);
183#else
184static 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
189extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align);
179extern void snmp_mib_free(void __percpu *ptr[2]); 190extern void snmp_mib_free(void __percpu *ptr[2]);
180 191
181extern struct local_ports { 192extern struct local_ports {