Re: [PATCH 0/4] crypto: introduce generic dynamic software fallback and EIP93 support
From: Jihong Min
Date: Wed Aug 19 2026 - 04:06:12 EST
Hi,
On 8/10/26 16:55, Herbert Xu wrote:
> On Tue, Jul 28, 2026 at 05:43:28PM +0900, Jihong Min wrote:
>>
>> The tcrypt AES-128-CBC results are median cycles from five runs. Lower
>> is better. Disabled uses cbc(aes-eip93) directly, while enabled uses
>> fallback(cbc(aes-eip93)).
>>
>> Request Disabled Enabled Cycle reduction
>> (bytes) (cycles) (cycles)
>> 16 322 18 94.4%
>> 64 274 43 84.3%
>> 128 292 74 74.7%
>> 256 312 138 55.8%
>> 1024 434 439 -1.2%
>> 1424 492 488 0.8%
>> 4096 980 1023 -4.4%
>
> Do these results vary that much at run-time that requires a run-time
> test? Surely you can predict the outcome for the platforms involved?>
> It appears to me that you're simply adding complexity for something
> that can already be easily tuned by the administrator through the
> algorithm priorities.
Many crypto IP including EIP93 can have different host CPU performance.
This idea is directly from in-kernel raid6 module to dynamically
calculate this host CPU performance to set the boundaries.
>
> In fact, why not implement the benchmark in user-space and then based
> on that result adjust the priorities?
The same reason why there is the kernel crypto API. It is a single point
(both AF_ALG and devcrypto) of entrance to each crypto device
implementation. It is best to control within them.
>
> Cheers,
Sincerely,
Jihong Min