diff options
author | Damjan Marion <damarion@cisco.com> | 2020-05-11 14:03:29 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2020-05-11 21:09:04 +0200 |
commit | 73a60b2da44847f3725d362a49207330d4d22aa5 (patch) | |
tree | 28cce70187bb368298dea6f2cfabed573a7e500f /src/plugins/crypto_native/crypto_native.h | |
parent | 1ae16c8f3bebe33b2404ad845a2f09f910a06390 (diff) |
crypto-native: properly deal with broken or outdated toolchains
Avoids crash due to missing symbol, when build system detects toolchain
which is not able to produce binaries for all targets we need....
Type: fix
Change-Id: I77ee63cb8dca3c9e4e83a6235c60f1439a472444
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/crypto_native/crypto_native.h')
-rw-r--r-- | src/plugins/crypto_native/crypto_native.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/crypto_native/crypto_native.h b/src/plugins/crypto_native/crypto_native.h index b83dd773e44..f1153737dea 100644 --- a/src/plugins/crypto_native/crypto_native.h +++ b/src/plugins/crypto_native/crypto_native.h @@ -36,17 +36,15 @@ typedef struct extern crypto_native_main_t crypto_native_main; -clib_error_t *crypto_native_aes_cbc_init_sse42 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_cbc_init_avx2 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_cbc_init_avx512 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_cbc_init_vaes (vlib_main_t * vm); -clib_error_t *crypto_native_aes_cbc_init_neon (vlib_main_t * vm); - -clib_error_t *crypto_native_aes_gcm_init_sse42 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_gcm_init_avx2 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_gcm_init_avx512 (vlib_main_t * vm); -clib_error_t *crypto_native_aes_gcm_init_vaes (vlib_main_t * vm); -clib_error_t *crypto_native_aes_gcm_init_neon (vlib_main_t * vm); +#define foreach_crypto_native_march_variant _(slm) _(hsw) _(skx) _(icl) _(neon) + +#define _(v) \ +clib_error_t __clib_weak *crypto_native_aes_cbc_init_##v (vlib_main_t * vm); \ +clib_error_t __clib_weak *crypto_native_aes_gcm_init_##v (vlib_main_t * vm); \ + +foreach_crypto_native_march_variant; +#undef _ + #endif /* __crypto_native_h__ */ /* |