diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2004-09-10 00:37:08 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-09-10 00:37:08 -0700 |
| commit | 34d67af8a52851c3e1b69349653b7797c44d551f (patch) | |
| tree | cd0ec798b90082d82da47b4e0aa9135388b8cd56 /include/net | |
| parent | 4d9f62e953567482223b7110c5e8961c4d494c1f (diff) | |
[IPCOMP]: Use per-cpu buffers for compression/decompression.
Here is a really ugly patch to get IPCOMP to use per-cpu buffers. But
I'm afraid it really is necessary. At 300K per SA IPCOMP isn't very
affordable at all.
With per-cpu buffers this goes down to 300K per CPU.
I've also turned the kmalloc'ed scratch space into a vmalloc'ed one
since people may be loading the ipcomp module after the system has
been running for a while. On an i386 machine with 64M of RAM or less
this can often cause a 64K kmalloc to fail.
The crypto deflate buffer space are vmalloc'ed already as well.
Part of the ugliness comes from the lazy allocation. However we need
the lazy initialisation since new IPCOMP algorithms may be introduced
in future. That means we can't allocate space for every single IPCOMP
algorithm at module-load time.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ipcomp.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/ipcomp.h b/include/net/ipcomp.h index e94a6488a7ee..e651a57ecdd5 100644 --- a/include/net/ipcomp.h +++ b/include/net/ipcomp.h @@ -5,8 +5,7 @@ struct ipcomp_data { u16 threshold; - u8 *scratch; - struct crypto_tfm *tfm; + struct crypto_tfm **tfms; }; #endif |
