diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2007-11-05 23:39:51 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-11-07 04:08:59 -0800 |
commit | c5a432f1a18b4b2efe691dd6bbb30d86a281f783 (patch) | |
tree | fcbff269067e11c49a0fd99a568edf03036f2d55 /net/ipv6/raw.c | |
parent | 47a31a6ffcca3b55149bccd5b99763e5eea60ac4 (diff) | |
download | linux-c5a432f1a18b4b2efe691dd6bbb30d86a281f783.tar.bz2 |
[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/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ca24ef19cd8f..807260d03586 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -1144,6 +1144,8 @@ static int rawv6_init_sk(struct sock *sk) return(0); } +DEFINE_PROTO_INUSE(rawv6) + struct proto rawv6_prot = { .name = "RAWv6", .owner = THIS_MODULE, @@ -1166,6 +1168,7 @@ struct proto rawv6_prot = { .compat_setsockopt = compat_rawv6_setsockopt, .compat_getsockopt = compat_rawv6_getsockopt, #endif + REF_PROTO_INUSE(rawv6) }; #ifdef CONFIG_PROC_FS |