Re: [PATCH 6/6] net/ipv6: sr: Switch to using crypto_pool

From: Dmitry Safonov
Date: Tue Aug 23 2022 - 16:06:49 EST


On 8/8/22 04:40, liulongfang wrote:
> On 2022/7/27 4:16, Dmitry Safonov Wrote:
>> The conversion to use crypto_pool has the following upsides:
>> - now SR uses asynchronous API which may potentially free CPU cycles and
>> improve performance for of CPU crypto algorithm providers;
>
> Is there any specific test data for this performance improvement?
> How much has the memory increased?
> How much has the performance improved?

I have no test data for this.
The idea behind this improvement is the same as behind crypto ahash: if
your CPU can benefit by offloading work to hw hash accelerator and there
is a driver that provides crypto backend, you may certainly win some
performance. The number depends on platform/driver in use.

>> - hash descriptors now don't have to be allocated on boot, but only at
>> the moment SR starts using HMAC and until the last HMAC secret is
>> deleted;
>> - potentially reuse ahash_request(s) for different users
>> - allocate only one per-CPU scratch buffer rather than a new one for
>> each user
>> - have a common API for net/ users that need ahash on RX/TX fast path

[..]

Thanks,
Dmitry