summaryrefslogtreecommitdiff
path: root/net/ipv6/udplite.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-05 23:39:51 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-07 04:08:59 -0800
commitc5a432f1a18b4b2efe691dd6bbb30d86a281f783 (patch)
treefcbff269067e11c49a0fd99a568edf03036f2d55 /net/ipv6/udplite.c
parent47a31a6ffcca3b55149bccd5b99763e5eea60ac4 (diff)
downloadlinux-3.10-c5a432f1a18b4b2efe691dd6bbb30d86a281f783.tar.gz
linux-3.10-c5a432f1a18b4b2efe691dd6bbb30d86a281f783.tar.bz2
linux-3.10-c5a432f1a18b4b2efe691dd6bbb30d86a281f783.zip
[IPV6]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Trivial patch to make "tcpv6,udpv6,udplitev6,rawv6" 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/ipv6/udplite.c')
-rw-r--r--net/ipv6/udplite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 766566f7de4..5a0379f7141 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -40,6 +40,8 @@ static int udplite_v6_get_port(struct sock *sk, unsigned short snum)
return udplite_get_port(sk, snum, ipv6_rcv_saddr_equal);
}
+DEFINE_PROTO_INUSE(udplitev6)
+
struct proto udplitev6_prot = {
.name = "UDPLITEv6",
.owner = THIS_MODULE,
@@ -62,6 +64,7 @@ struct proto udplitev6_prot = {
.compat_setsockopt = compat_udpv6_setsockopt,
.compat_getsockopt = compat_udpv6_getsockopt,
#endif
+ REF_PROTO_INUSE(udplitev6)
};
static struct inet_protosw udplite6_protosw = {