AES: Add POWER ISA 2.7+ optimization#213
Open
runlevel5 wants to merge 2 commits into
Open
Conversation
Assisted-by: Lance Albertson <lance@osuosl.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is it
Adds a POWER8 AES SIMD path to
AesOpt.cand wires it into the runtime dispatch inAes.c, using the in-core AES instructions introduced in Power ISA 2.07 (vcipher,vcipherlast,vncipher,vncipherlast). Both ppc64le and ppc64be are supported. The path is selected at runtime viaCPU_IsSupported_VEC_CRYPTO()and falls through to the scalar implementation on hosts without the feature.AES throughput on POWER (16 MB buffer, best-of-8, MB/s)
HW vs SW speedup
CBC decode HW has no apples-to-apples SW comparison on PPC —
Aes_SetKey_Decemits the encryption schedule when HW is active (seeAes.h), so scalar decode would need a separate IMC-applied schedule.Host details
VEC_CRYPTOARCH_3_00ARCH_3_1I hope this is a good starting point for future optimizations (such as CRC, SHA, etc)
Notes
Credits