summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udplite.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-05 23:39:16 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-07 04:08:58 -0800
commit47a31a6ffcca3b55149bccd5b99763e5eea60ac4 (patch)
treede45b7c03799f16e717b9bf63b249bfe5f0f19a4 /net/ipv4/udplite.c
parent286ab3d46058840d68e5d7d52e316c1f7e98c59f (diff)
downloadlinux-47a31a6ffcca3b55149bccd5b99763e5eea60ac4.tar.gz
linux-47a31a6ffcca3b55149bccd5b99763e5eea60ac4.tar.bz2
linux-47a31a6ffcca3b55149bccd5b99763e5eea60ac4.zip
[IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Trivial patch to make "tcp,udp,udplite,raw" protocols uses the fast "inuse sockets" infrastructure Each protocol use then a static percpu var, instead of a dynamic one. This saves some ram and some cpu cycles Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udplite.c')
-rw-r--r--net/ipv4/udplite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index 94977205abb4..f5baeb3e8b85 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -44,6 +44,8 @@ static struct net_protocol udplite_protocol = {
.no_policy = 1,
};
+DEFINE_PROTO_INUSE(udplite)
+
struct proto udplite_prot = {
.name = "UDP-Lite",
.owner = THIS_MODULE,
@@ -67,6 +69,7 @@ struct proto udplite_prot = {
.compat_setsockopt = compat_udp_setsockopt,
.compat_getsockopt = compat_udp_getsockopt,
#endif
+ REF_PROTO_INUSE(udplite)
};
static struct inet_protosw udplite4_protosw = {