Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] lib/crypto: tests: Add some additional lengths to the ChaCha benchmark
@ 2026-11-04 23:06 Eric Biggers
  2026-11-05 15:33 ` Antonio Quartulli
  2026-11-07 22:06 ` Eric Biggers
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Biggers @ 2026-11-04 23:06 UTC (permalink / raw)
  To: linux-crypto
  Cc: Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu, Martin Willi,
	Antonio Quartulli, Eric Biggers

All the benchmarked lengths below 1420 are multiples of the ChaCha block
size, and all except 64 are a multiple of 4 blocks.  Add some additional
lengths to cover a wider variety of situations.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 lib/crypto/tests/chacha_kunit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/crypto/tests/chacha_kunit.c b/lib/crypto/tests/chacha_kunit.c
index bbf73dcbafee..2e002e46976e 100644
--- a/lib/crypto/tests/chacha_kunit.c
+++ b/lib/crypto/tests/chacha_kunit.c
@@ -217,7 +217,8 @@ static void test_chacha_rfc7539(struct kunit *test)
 static void benchmark_chacha(struct kunit *test)
 {
 	static const size_t lens_to_test[] = {
-		64, 256, 512, 1024, 1420, 2048, 4096, 8920, 16384,
+		64,   128,  200,  256,	511,  512,   513,
+		1024, 1420, 2048, 4096, 8920, 16384,
 	};
 	const size_t max_len = 16384;
 	u8 *data = alloc_buf(test, max_len);

base-commit: 9fbbbaefd5f95551da18426c200cf41e1b4255a1
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-07 22:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 23:06 [PATCH] lib/crypto: tests: Add some additional lengths to the ChaCha benchmark Eric Biggers
2026-11-05 15:33 ` Antonio Quartulli
2026-11-07 21:06   ` Eric Biggers
2026-11-07 22:06 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox