From: "Diederik de Haas" <diederik@cknow-tech.com>
To: "Eric Biggers" <ebiggers@kernel.org>,
"Diederik de Haas" <diederik@cknow-tech.com>
Cc: "Dawid Olesinski" <dawidro@gmail.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Corentin Labbe" <clabbe@baylibre.com>,
<linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-rockchip@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader
Date: Tue, 18 Aug 2026 21:31:17 +0200 [thread overview]
Message-ID: <DKSBIH29Z9DE.1OR442P0XUSCS@cknow-tech.com> (raw)
In-Reply-To: <20260818185810.GA7030@quark>
On Tue Aug 18, 2026 at 8:58 PM CEST, Eric Biggers wrote:
> On Mon, Aug 03, 2026 at 12:42:03PM +0200, Diederik de Haas wrote:
>> crypto-rk3566-test-no-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/bb5dbfd59f244a6422b965b30f9796ebbfdb1fcb
>> crypto-rk3566-test-with-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/ea72297678e19cbbc987de9548f9884382e1d1cc
>> crypto-rk3568-test-no-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/309e519e6b1c31f4c1c5bcb1ea16cc8569a54830
>> crypto-rk3568-test-with-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/1e1e938ebbbae75128974fe0a7c240843bce04c8
>> crypto-rk3588-test-no-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/9a2adc2b2e42131445ce4576589e00ecf51ccb4b
>> crypto-rk3588-test-with-crypto-module-log.txt:
>> https://paste.sr.ht/~diederik/e04c11c8809031ca45662f7d4c227c1ba6162b65
>
> Thanks for running some benchmarks!
>
> Looking at your results for rk3566 for example, SHA-256 on 4096-byte
> blocks is 115 cycles/operation for sha256-lib (i.e. ARMv8 CE) or 3027
> cycles/operation for rk2-sha256. So the Rockchip driver is 26 times
> slower than simply using the existing well-tested CPU-based code.
I shared the results because:
1) I figured it might be useful to have these numbers
2) I didn't know how to interpret the results.
Because a lower cycles/operations would IMO *logically* be better and
your response above seems to confirm that.
Which makes the following results a 'bit' concerning?
``modprobe tcrypt mode=404``
[255753.686837] tcrypt: testing speed of async sha256 (sha256-lib)
[255753.686841] tcrypt: test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 703 cycles/operation, 43 cycles/byte
[255753.686848] tcrypt: test 1 ( 64 byte blocks, 16 bytes per update, 4 updates): 1101 cycles/operation, 17 cycles/byte
[255753.686856] tcrypt: test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 869 cycles/operation, 13 cycles/byte
[255753.686861] tcrypt: test 3 ( 256 byte blocks, 16 bytes per update, 16 updates): 1676 cycles/operation, 6 cycles/byte
[255753.686871] tcrypt: test 4 ( 256 byte blocks, 64 bytes per update, 4 updates): 1059 cycles/operation, 4 cycles/byte
[255753.686877] tcrypt: test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 1249 cycles/operation, 4 cycles/byte
[255753.686884] tcrypt: test 6 ( 1024 byte blocks, 16 bytes per update, 64 updates): 4156 cycles/operation, 4 cycles/byte
[255753.686904] tcrypt: test 7 ( 1024 byte blocks, 256 bytes per update, 4 updates): 1054 cycles/operation, 1 cycles/byte
[255753.686911] tcrypt: test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 2826 cycles/operation, 2 cycles/byte
[255753.686923] tcrypt: test 9 ( 2048 byte blocks, 16 bytes per update, 128 updates): 7438 cycles/operation, 3 cycles/byte
[255753.686957] tcrypt: test 10 ( 2048 byte blocks, 256 bytes per update, 8 updates): 1263 cycles/operation, 0 cycles/byte
[255753.686966] tcrypt: test 11 ( 2048 byte blocks, 1024 bytes per update, 2 updates): 940 cycles/operation, 0 cycles/byte
[255753.686973] tcrypt: test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 4887 cycles/operation, 2 cycles/byte
[255753.686991] tcrypt: test 13 ( 4096 byte blocks, 16 bytes per update, 256 updates): 14017 cycles/operation, 3 cycles/byte
[255753.687054] tcrypt: test 14 ( 4096 byte blocks, 256 bytes per update, 16 updates): 1681 cycles/operation, 0 cycles/byte
[255753.687065] tcrypt: test 15 ( 4096 byte blocks, 1024 bytes per update, 4 updates): 1059 cycles/operation, 0 cycles/byte
[255753.687074] tcrypt: test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 9044 cycles/operation, 2 cycles/byte
[255753.687105] tcrypt: test 17 ( 8192 byte blocks, 16 bytes per update, 512 updates): 27155 cycles/operation, 3 cycles/byte
[255753.687224] tcrypt: test 18 ( 8192 byte blocks, 256 bytes per update, 32 updates): 2489 cycles/operation, 0 cycles/byte
[255753.687241] tcrypt: test 19 ( 8192 byte blocks, 1024 bytes per update, 8 updates): 1268 cycles/operation, 0 cycles/byte
[255753.687253] tcrypt: test 20 ( 8192 byte blocks, 4096 bytes per update, 2 updates): 959 cycles/operation, 0 cycles/byte
[255753.687263] tcrypt: test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 17812 cycles/operation, 2 cycles/byte
This is on my AMD Ryzen 7 5800X which I would've expected to blow
a simple RK3566 SBC out of the water ... :-/
> Don't you love "accelerators" that make things 26 times slower?
>
> I guess we'll get the usual argument that this driver is really just for
> "testing" or whatever.
Or someone spend a significant time implementing it trying to improve and
extend SoC support in good faith, but without your insight.
Which is 'coincidentally' the exact reason why I suggested the patch series
author to explicitly put you in To or CC.
I would not have used "pushing the driver as a checkbox feature" as argument.
Especially since, apparently, the numbers show it performs poorly.
My 0.02
next prev parent reply other threads:[~2026-08-18 19:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 17:58 [PATCH v2 0/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader Dawid Olesinski
2026-07-08 17:58 ` [PATCH v2 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding Dawid Olesinski
2026-07-08 23:53 ` Sebastian Reichel
2026-07-08 17:58 ` [PATCH v2 2/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader driver Dawid Olesinski
2026-07-08 17:58 ` [PATCH v2 3/4] arm64: dts: rockchip: Add crypto node to rk356x-base Dawid Olesinski
2026-07-08 23:56 ` Sebastian Reichel
2026-07-09 7:07 ` Heiko Stübner
2026-07-10 14:30 ` Dawid Olesinski
2026-07-25 14:13 ` Diederik de Haas
2026-07-08 17:58 ` [PATCH v2 4/4] arm64: dts: rockchip: Add crypto node to rk3588-base Dawid Olesinski
2026-08-03 10:42 ` [PATCH v2 0/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader Diederik de Haas
2026-08-18 18:58 ` Eric Biggers
2026-08-18 19:31 ` Diederik de Haas [this message]
2026-08-18 20:04 ` Eric Biggers
2026-08-18 20:23 ` Diederik de Haas
2026-08-18 20:37 ` Eric Biggers
2026-08-16 19:39 ` [PATCH v3 " Dawid Olesinski
2026-08-16 19:39 ` [PATCH v3 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding Dawid Olesinski
2026-08-17 8:14 ` Diederik de Haas
2026-08-18 7:42 ` Krzysztof Kozlowski
2026-08-16 19:39 ` [PATCH v3 2/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader driver Dawid Olesinski
2026-08-18 7:36 ` Krzysztof Kozlowski
2026-08-18 17:43 ` Eric Biggers
2026-08-16 19:39 ` [PATCH v3 3/4] arm64: dts: rockchip: Add crypto node to rk356x-base Dawid Olesinski
2026-08-16 19:39 ` [PATCH v3 4/4] arm64: dts: rockchip: Add crypto node to rk3588-base Dawid Olesinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DKSBIH29Z9DE.1OR442P0XUSCS@cknow-tech.com \
--to=diederik@cknow-tech.com \
--cc=clabbe@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=dawidro@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=ebiggers@kernel.org \
--cc=heiko@sntech.de \
--cc=herbert@gondor.apana.org.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox