aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-11 14:30:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:33 -0500
commit1781f7f5804e52ee2d35328b129602146a8d8254 (patch)
treedc67102f480e59d87859c50392452be4f41487bd /include
parent27ab2568649d5ba6c5a20212079b7c4f6da4ca0d (diff)
[UDP]: Restore missing inDatagrams increments
The previous move of the the UDP inDatagrams counter caused the counting of encapsulated packets, SUNRPC data (as opposed to call) packets and RXRPC packets to go missing. This patch restores all of these. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ipv6.h9
-rw-r--r--include/net/udp.h25
-rw-r--r--include/net/udplite.h3
3 files changed, 25 insertions, 12 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index e90f9625cb1b..a84f3f697a34 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -164,15 +164,6 @@ DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics);
164#define ICMP6MSGIN_INC_STATS_USER(idev, field) \ 164#define ICMP6MSGIN_INC_STATS_USER(idev, field) \
165 _DEVINC(icmpv6msg, _USER, idev, field) 165 _DEVINC(icmpv6msg, _USER, idev, field)
166 166
167DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6);
168DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
169#define UDP6_INC_STATS_BH(field, is_udplite) do { \
170 if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \
171 else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0)
172#define UDP6_INC_STATS_USER(field, is_udplite) do { \
173 if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \
174 else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0)
175
176struct ip6_ra_chain 167struct ip6_ra_chain
177{ 168{
178 struct ip6_ra_chain *next; 169 struct ip6_ra_chain *next;
diff --git a/include/net/udp.h b/include/net/udp.h
index 98755ebaf163..98cb09ca3a27 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -139,6 +139,12 @@ extern int udp_lib_setsockopt(struct sock *sk, int level, int optname,
139 int (*push_pending_frames)(struct sock *)); 139 int (*push_pending_frames)(struct sock *));
140 140
141DECLARE_SNMP_STAT(struct udp_mib, udp_statistics); 141DECLARE_SNMP_STAT(struct udp_mib, udp_statistics);
142DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6);
143
144/* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */
145DECLARE_SNMP_STAT(struct udp_mib, udplite_statistics);
146DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
147
142/* 148/*
143 * SNMP statistics for UDP and UDP-Lite 149 * SNMP statistics for UDP and UDP-Lite
144 */ 150 */
@@ -149,6 +155,25 @@ DECLARE_SNMP_STAT(struct udp_mib, udp_statistics);
149 if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ 155 if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \
150 else SNMP_INC_STATS_BH(udp_statistics, field); } while(0) 156 else SNMP_INC_STATS_BH(udp_statistics, field); } while(0)
151 157
158#define UDP6_INC_STATS_BH(field, is_udplite) do { \
159 if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \
160 else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0)
161#define UDP6_INC_STATS_USER(field, is_udplite) do { \
162 if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \
163 else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0)
164
165#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
166#define UDPX_INC_STATS_BH(sk, field) \
167 do { \
168 if ((sk)->sk_family == AF_INET) \
169 UDP_INC_STATS_BH(field, 0); \
170 else \
171 UDP6_INC_STATS_BH(field, 0); \
172 } while (0);
173#else
174#define UDPX_INC_STATS_BH(sk, field) UDP_INC_STATS_BH(field, 0)
175#endif
176
152/* /proc */ 177/* /proc */
153struct udp_seq_afinfo { 178struct udp_seq_afinfo {
154 struct module *owner; 179 struct module *owner;
diff --git a/include/net/udplite.h b/include/net/udplite.h
index 635b0eafca95..b76b2e377af4 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -13,9 +13,6 @@
13extern struct proto udplite_prot; 13extern struct proto udplite_prot;
14extern struct hlist_head udplite_hash[UDP_HTABLE_SIZE]; 14extern struct hlist_head udplite_hash[UDP_HTABLE_SIZE];
15 15
16/* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */
17DECLARE_SNMP_STAT(struct udp_mib, udplite_statistics);
18
19/* 16/*
20 * Checksum computation is all in software, hence simpler getfrag. 17 * Checksum computation is all in software, hence simpler getfrag.
21 */ 18 */