diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2007-11-06 02:39:16 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-11-07 07:08:58 -0500 |
commit | 47a31a6ffcca3b55149bccd5b99763e5eea60ac4 (patch) | |
tree | de45b7c03799f16e717b9bf63b249bfe5f0f19a4 /net/ipv4/raw.c | |
parent | 286ab3d46058840d68e5d7d52e316c1f7e98c59f (diff) |
[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/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 3916faca3afe..66b42f547bf9 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -760,6 +760,8 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg) | |||
760 | } | 760 | } |
761 | } | 761 | } |
762 | 762 | ||
763 | DEFINE_PROTO_INUSE(raw) | ||
764 | |||
763 | struct proto raw_prot = { | 765 | struct proto raw_prot = { |
764 | .name = "RAW", | 766 | .name = "RAW", |
765 | .owner = THIS_MODULE, | 767 | .owner = THIS_MODULE, |
@@ -781,6 +783,7 @@ struct proto raw_prot = { | |||
781 | .compat_setsockopt = compat_raw_setsockopt, | 783 | .compat_setsockopt = compat_raw_setsockopt, |
782 | .compat_getsockopt = compat_raw_getsockopt, | 784 | .compat_getsockopt = compat_raw_getsockopt, |
783 | #endif | 785 | #endif |
786 | REF_PROTO_INUSE(raw) | ||
784 | }; | 787 | }; |
785 | 788 | ||
786 | #ifdef CONFIG_PROC_FS | 789 | #ifdef CONFIG_PROC_FS |