diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-01-25 05:53:42 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2005-01-25 05:53:42 -0800 |
| commit | d113f0f0334c5dfbf5dd7909c80fb12b0359fa72 (patch) | |
| tree | cea68f9657c764237d6f8275f229cb1bbd34ca1a /include/linux/crypto.h | |
| parent | 7a303cfdb151440b97c540dc1f3a5e43b8c3d802 (diff) | |
[XFRM]: Probe selected algorithm only.
This patch removes an annoying problem in xfrm_user. As it is every
time an SA is added it probes every known algorithm in the universe.
Now if they all existed it would be OK. However, for the ones which
don't actually exist this causes multiple /sbin/modprobe processes to
be spawned which slows the system down when you're adding hundreds of
SAs.
Since we know the type of algorithm required when we're adding a new
SA, we can get away with only probing the selected algorithms. This
is what the following patch does for xfrm_user.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/crypto.h')
| -rw-r--r-- | include/linux/crypto.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4626d40e8c6e..387da6a3e58c 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -16,6 +16,7 @@ #ifndef _LINUX_CRYPTO_H #define _LINUX_CRYPTO_H +#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> @@ -121,7 +122,14 @@ int crypto_unregister_alg(struct crypto_alg *alg); /* * Algorithm query interface. */ +#ifdef CONFIG_CRYPTO int crypto_alg_available(const char *name, u32 flags); +#else +static inline int crypto_alg_available(const char *name, u32 flags) +{ + return 0; +} +#endif /* * Transforms: user-instantiated objects which encapsulate algorithms |
