Compare commits

..

2 Commits

Author SHA1 Message Date
Andrew Yourtchenko
6e8b350a01 misc: VPP 24.06 Release Notes
Type: docs
Change-Id: Id47dbab5e5661c76e6ff41237bbca5b5b15506c4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-06-24 16:41:46 +02:00
Damjan Marion
6244633428 crypto-native: fix CPU detection for SHA2 code
Type: fix
Fixes: 9f2799f
Change-Id: Ib2b2df17507c536350ec92eeb1eea58f3a240c76
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 2aa0f0da5dedcf6301c74a39b5e3749359e07e6d)
2024-06-14 12:12:34 +00:00
3 changed files with 516 additions and 3 deletions

View File

@ -6,6 +6,7 @@ Release notes
.. toctree::
:maxdepth: 2
v24.06
v24.02
v23.10
v23.06

File diff suppressed because it is too large Load Diff

View File

@ -118,12 +118,24 @@ sha2_key_add (vnet_crypto_key_t *key, clib_sha2_type_t type)
static int
probe ()
{
#if defined(__SHA__) && defined(__x86_64__)
#if defined(__x86_64__)
#if defined(__SHA__) && defined(__AVX512F__)
if (clib_cpu_supports_sha () && clib_cpu_supports_avx512f ())
return 30;
#elif defined(__SHA__) && defined(__AVX2__)
if (clib_cpu_supports_sha () && clib_cpu_supports_avx2 ())
return 20;
#elif defined(__SHA__)
if (clib_cpu_supports_sha ())
return 50;
#elif defined(__ARM_FEATURE_SHA2)
return 10;
#endif
#elif defined(__aarch64__)
#if defined(__ARM_FEATURE_SHA2)
if (clib_cpu_supports_sha2 ())
return 10;
#endif
#endif
return -1;
}