diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 13:03:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 13:03:27 +0200 |
commit | 2f275f91a438abd8eec5321798d66a4ffe6869fa (patch) | |
tree | a14cc8f7112d2ba0dfe08e43577cab779b858ba6 /include/net/udp.h | |
parent | mib: put net statistics on struct net (diff) | |
download | linux-2f275f91a438abd8eec5321798d66a4ffe6869fa.tar.xz linux-2f275f91a438abd8eec5321798d66a4ffe6869fa.zip |
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/udp.h')
-rw-r--r-- | include/net/udp.h | 9 |
1 files changed, 4 insertions, 5 deletions
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, char __user *optval, int optlen, int (*push_pending_frames)(struct sock *)); -DECLARE_SNMP_STAT(struct udp_mib, udp_statistics); DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); /* 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); /* * SNMP statistics for UDP and UDP-Lite */ -#define UDP_INC_STATS_USER(net, field, is_udplite) do { (void)net; \ +#define UDP_INC_STATS_USER(net, field, is_udplite) do { \ if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \ - else SNMP_INC_STATS_USER(udp_statistics, field); } while(0) -#define UDP_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ + else SNMP_INC_STATS_USER((net)->mib.udp_statistics, field); } while(0) +#define UDP_INC_STATS_BH(net, field, is_udplite) do { \ if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ - else SNMP_INC_STATS_BH(udp_statistics, field); } while(0) + else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) #define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ |