diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-16 23:30:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:30:14 -0400 |
commit | 4e6734447dbc7a0a85e09616821c0782d9fb1141 (patch) | |
tree | 4fa4e7f6a479a172d690fba7f50c0659cb977e2d | |
parent | 1ed834655a0d42ecd80ff051e681e2ea44747b6c (diff) |
mib: add net to NET_INC_STATS
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 93d0e093ff49..b42a43499856 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -161,7 +161,7 @@ DECLARE_SNMP_STAT(struct ipstats_mib, ip_statistics); | |||
161 | #define IP_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(ip_statistics, field); } while (0) | 161 | #define IP_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(ip_statistics, field); } while (0) |
162 | #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH(ip_statistics, field, val) | 162 | #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH(ip_statistics, field, val) |
163 | DECLARE_SNMP_STAT(struct linux_mib, net_statistics); | 163 | DECLARE_SNMP_STAT(struct linux_mib, net_statistics); |
164 | #define NET_INC_STATS(field) SNMP_INC_STATS(net_statistics, field) | 164 | #define NET_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(net_statistics, field); } while (0) |
165 | #define NET_INC_STATS_BH(field) SNMP_INC_STATS_BH(net_statistics, field) | 165 | #define NET_INC_STATS_BH(field) SNMP_INC_STATS_BH(net_statistics, field) |
166 | #define NET_INC_STATS_USER(field) SNMP_INC_STATS_USER(net_statistics, field) | 166 | #define NET_INC_STATS_USER(field) SNMP_INC_STATS_USER(net_statistics, field) |
167 | #define NET_ADD_STATS_BH(field, adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) | 167 | #define NET_ADD_STATS_BH(field, adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bc8559a6f7e5..85f08291e928 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -319,7 +319,7 @@ EXPORT_SYMBOL(tcp_memory_pressure); | |||
319 | void tcp_enter_memory_pressure(struct sock *sk) | 319 | void tcp_enter_memory_pressure(struct sock *sk) |
320 | { | 320 | { |
321 | if (!tcp_memory_pressure) { | 321 | if (!tcp_memory_pressure) { |
322 | NET_INC_STATS(LINUX_MIB_TCPMEMORYPRESSURES); | 322 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURES); |
323 | tcp_memory_pressure = 1; | 323 | tcp_memory_pressure = 1; |
324 | } | 324 | } |
325 | } | 325 | } |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c3b0da826980..176f0702b8ac 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2119,7 +2119,7 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority) | |||
2119 | /* NOTE: No TCP options attached and we never retransmit this. */ | 2119 | /* NOTE: No TCP options attached and we never retransmit this. */ |
2120 | skb = alloc_skb(MAX_TCP_HEADER, priority); | 2120 | skb = alloc_skb(MAX_TCP_HEADER, priority); |
2121 | if (!skb) { | 2121 | if (!skb) { |
2122 | NET_INC_STATS(LINUX_MIB_TCPABORTFAILED); | 2122 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTFAILED); |
2123 | return; | 2123 | return; |
2124 | } | 2124 | } |
2125 | 2125 | ||
@@ -2130,7 +2130,7 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority) | |||
2130 | /* Send it off. */ | 2130 | /* Send it off. */ |
2131 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 2131 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
2132 | if (tcp_transmit_skb(sk, skb, 0, priority)) | 2132 | if (tcp_transmit_skb(sk, skb, 0, priority)) |
2133 | NET_INC_STATS(LINUX_MIB_TCPABORTFAILED); | 2133 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTFAILED); |
2134 | 2134 | ||
2135 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTRSTS); | 2135 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTRSTS); |
2136 | } | 2136 | } |