diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 07:02:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 07:02:08 -0400 |
commit | 57ef42d59d1c1d79be59fc3c6380ae14234e38c3 (patch) | |
tree | 4ccc2166f6967ac1fb582715f7d7d5bb5c9205fc /include | |
parent | 9b4661bd6e5437508e0920608f3213c23212cd1b (diff) |
mib: put tcp statistics on struct net
Proc temporary uses stats from init_net.
BTW, TCP_XXX_STATS are beautiful (w/o do { } while (0) facing) again :)
Signed-off-by: Pavel Emelyanov <xemul@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/tcp.h | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index 9f4b31ed18c3..8f96079bf0e3 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <net/snmp.h> | 4 | #include <net/snmp.h> |
5 | 5 | ||
6 | struct netns_mib { | 6 | struct netns_mib { |
7 | DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); | ||
7 | }; | 8 | }; |
8 | 9 | ||
9 | #endif | 10 | #endif |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 60e5be8b925b..92d7b551dc55 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -265,11 +265,10 @@ static inline int tcp_too_many_orphans(struct sock *sk, int num) | |||
265 | 265 | ||
266 | extern struct proto tcp_prot; | 266 | extern struct proto tcp_prot; |
267 | 267 | ||
268 | DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics); | 268 | #define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field) |
269 | #define TCP_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(tcp_statistics, field); } while (0) | 269 | #define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field) |
270 | #define TCP_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(tcp_statistics, field); } while (0) | 270 | #define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field) |
271 | #define TCP_DEC_STATS(net, field) do { (void)net; SNMP_DEC_STATS(tcp_statistics, field); } while (0) | 271 | #define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) |
272 | #define TCP_ADD_STATS_USER(net, field, val) do { (void)net; SNMP_ADD_STATS_USER(tcp_statistics, field, val); } while (0) | ||
273 | 272 | ||
274 | extern void tcp_v4_err(struct sk_buff *skb, u32); | 273 | extern void tcp_v4_err(struct sk_buff *skb, u32); |
275 | 274 | ||