diff options
author | Denis V. Lunev <den@openvz.org> | 2008-10-07 17:50:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-07 17:50:06 -0400 |
commit | be713a443ee019489890e93654557916fbf72612 (patch) | |
tree | 0ff5bacfd4b6f17ccc380ef01fcd6661959531b8 /include | |
parent | 0c7ed677fb7013c8028045d409a48ac42151187a (diff) |
netns: make uplitev6 mib per/namespace
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netns/mib.h | 1 | ||||
-rw-r--r-- | include/net/udp.h | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index ba622b24b847..4e58f0519ce8 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h | |||
@@ -15,6 +15,7 @@ struct netns_mib { | |||
15 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 15 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
16 | struct proc_dir_entry *proc_net_devsnmp6; | 16 | struct proc_dir_entry *proc_net_devsnmp6; |
17 | DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6); | 17 | DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6); |
18 | DEFINE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | ||
18 | #endif | 19 | #endif |
19 | }; | 20 | }; |
20 | 21 | ||
diff --git a/include/net/udp.h b/include/net/udp.h index 72f28c3ddaae..1e205095ea68 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -152,9 +152,6 @@ extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, | |||
152 | __be32 daddr, __be16 dport, | 152 | __be32 daddr, __be16 dport, |
153 | int dif); | 153 | int dif); |
154 | 154 | ||
155 | /* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ | ||
156 | DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | ||
157 | |||
158 | /* | 155 | /* |
159 | * SNMP statistics for UDP and UDP-Lite | 156 | * SNMP statistics for UDP and UDP-Lite |
160 | */ | 157 | */ |
@@ -166,12 +163,12 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | |||
166 | else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) | 163 | else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) |
167 | 164 | ||
168 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { \ | 165 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { \ |
169 | if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ | 166 | if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_stats_in6, field);\ |
170 | else SNMP_INC_STATS_BH((net)->mib.udp_stats_in6, field); \ | 167 | else SNMP_INC_STATS_BH((net)->mib.udp_stats_in6, field); \ |
171 | } while(0) | 168 | } while(0) |
172 | #define UDP6_INC_STATS_USER(net, field, is_udplite) do { \ | 169 | #define UDP6_INC_STATS_USER(net, field, __lite) do { \ |
173 | if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ | 170 | if (__lite) SNMP_INC_STATS_USER((net)->mib.udplite_stats_in6, field); \ |
174 | else SNMP_INC_STATS_USER((net)->mib.udp_stats_in6, field); \ | 171 | else SNMP_INC_STATS_USER((net)->mib.udp_stats_in6, field); \ |
175 | } while(0) | 172 | } while(0) |
176 | 173 | ||
177 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 174 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |