From: Herbert Xu Date: Fri, 14 Dec 2007 19:25:26 +0000 (-0800) Subject: [UDP]: Move udp_stats_in6 into net/ipv4/udp.c X-Git-Tag: v2.6.25-rc1~1162^2~1082 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9055e051b8d4b266054fe511a65a9888d30fa64f;p=linux-2.6-omap-h63xx.git [UDP]: Move udp_stats_in6 into net/ipv4/udp.c Now that external users may increment the counters directly, we need to ensure that udp_stats_in6 is always available. Otherwise we'd either have to requrie the external users to be built as modules or ipv6 to be built-in. This isn't too bad because udp_stats_in6 is just a pair of pointers plus an EXPORT, e.g., just 40 (16 + 24) bytes on x86-64. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 9ed6393c65d..3d602158565 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -112,6 +112,9 @@ DEFINE_SNMP_STAT(struct udp_mib, udp_statistics) __read_mostly; EXPORT_SYMBOL(udp_statistics); +DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6) __read_mostly; +EXPORT_SYMBOL(udp_stats_in6); + struct hlist_head udp_hash[UDP_HTABLE_SIZE]; DEFINE_RWLOCK(udp_hash_lock); diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 8b3e6d61bf5..c9a97b40551 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -51,9 +51,6 @@ #include #include "udp_impl.h" -DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6) __read_mostly; -EXPORT_SYMBOL(udp_stats_in6); - static inline int udp_v6_get_port(struct sock *sk, unsigned short snum) { return udp_get_port(sk, snum, ipv6_rcv_saddr_equal);