diff options
Diffstat (limited to 'include/net')
-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 9f4b31ed18c..8f96079bf0e 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h @@ -4,6 +4,7 @@ #include <net/snmp.h> struct netns_mib { + DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); }; #endif diff --git a/include/net/tcp.h b/include/net/tcp.h index 60e5be8b925..92d7b551dc5 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) extern struct proto tcp_prot; -DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics); -#define TCP_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(tcp_statistics, field); } while (0) -#define TCP_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(tcp_statistics, field); } while (0) -#define TCP_DEC_STATS(net, field) do { (void)net; SNMP_DEC_STATS(tcp_statistics, field); } while (0) -#define TCP_ADD_STATS_USER(net, field, val) do { (void)net; SNMP_ADD_STATS_USER(tcp_statistics, field, val); } while (0) +#define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field) +#define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field) +#define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field) +#define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) extern void tcp_v4_err(struct sk_buff *skb, u32); |