aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-06 02:39:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-07 07:08:59 -0500
commitc5a432f1a18b4b2efe691dd6bbb30d86a281f783 (patch)
treefcbff269067e11c49a0fd99a568edf03036f2d55 /net/ipv6/raw.c
parent47a31a6ffcca3b55149bccd5b99763e5eea60ac4 (diff)
[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.c3
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)
1144 return(0); 1144 return(0);
1145} 1145}
1146 1146
1147DEFINE_PROTO_INUSE(rawv6)
1148
1147struct proto rawv6_prot = { 1149struct proto rawv6_prot = {
1148 .name = "RAWv6", 1150 .name = "RAWv6",
1149 .owner = THIS_MODULE, 1151 .owner = THIS_MODULE,
@@ -1166,6 +1168,7 @@ struct proto rawv6_prot = {
1166 .compat_setsockopt = compat_rawv6_setsockopt, 1168 .compat_setsockopt = compat_rawv6_setsockopt,
1167 .compat_getsockopt = compat_rawv6_getsockopt, 1169 .compat_getsockopt = compat_rawv6_getsockopt,
1168#endif 1170#endif
1171 REF_PROTO_INUSE(rawv6)
1169}; 1172};
1170 1173
1171#ifdef CONFIG_PROC_FS 1174#ifdef CONFIG_PROC_FS