diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 07:03:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 07:03:27 -0400 |
commit | 2f275f91a438abd8eec5321798d66a4ffe6869fa (patch) | |
tree | a14cc8f7112d2ba0dfe08e43577cab779b858ba6 /include/net | |
parent | 61a7e26028b94805fd686a6dc9dbd9941f8f19b0 (diff) |
mib: put udp statistics on struct net
Similar to... ouch, I repeat myself.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netns/mib.h | 1 | ||||
-rw-r--r-- | include/net/udp.h | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index b5b1115adfa8..738c87ce183d 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h | |||
@@ -7,6 +7,7 @@ struct netns_mib { | |||
7 | DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); | 7 | DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); |
8 | DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics); | 8 | DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics); |
9 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); | 9 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); |
10 | DEFINE_SNMP_STAT(struct udp_mib, udp_statistics); | ||
10 | }; | 11 | }; |
11 | 12 | ||
12 | #endif | 13 | #endif |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e551592aa76..ba5544152708 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -148,7 +148,6 @@ extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, | |||
148 | char __user *optval, int optlen, | 148 | char __user *optval, int optlen, |
149 | int (*push_pending_frames)(struct sock *)); | 149 | int (*push_pending_frames)(struct sock *)); |
150 | 150 | ||
151 | DECLARE_SNMP_STAT(struct udp_mib, udp_statistics); | ||
152 | DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); | 151 | DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); |
153 | 152 | ||
154 | /* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ | 153 | /* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ |
@@ -158,12 +157,12 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | |||
158 | /* | 157 | /* |
159 | * SNMP statistics for UDP and UDP-Lite | 158 | * SNMP statistics for UDP and UDP-Lite |
160 | */ | 159 | */ |
161 | #define UDP_INC_STATS_USER(net, field, is_udplite) do { (void)net; \ | 160 | #define UDP_INC_STATS_USER(net, field, is_udplite) do { \ |
162 | if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \ | 161 | if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \ |
163 | else SNMP_INC_STATS_USER(udp_statistics, field); } while(0) | 162 | else SNMP_INC_STATS_USER((net)->mib.udp_statistics, field); } while(0) |
164 | #define UDP_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ | 163 | #define UDP_INC_STATS_BH(net, field, is_udplite) do { \ |
165 | if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ | 164 | if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ |
166 | else SNMP_INC_STATS_BH(udp_statistics, field); } while(0) | 165 | else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) |
167 | 166 | ||
168 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ | 167 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ |
169 | if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ | 168 | if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ |