Skip to content

Commit 3ae88f6

Browse files
horiagherbertx
authored andcommitted
crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks
Commit ad6d66b ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks") mentions: > power-of-2 block size. So let's add 1420 bytes explicitly, and round > it up to the next blocksize multiple of the algo in question if it > does not support 1420 byte blocks. but misses updating skcipher multi-buffer tests. Fix this by using the proper (rounded) input size. Fixes: ad6d66b ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks") Signed-off-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 7e75c33 commit 3ae88f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crypto/tcrypt.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ static void test_mb_skcipher_speed(const char *algo, int enc, int secs,
13331333

13341334
if (bs > XBUFSIZE * PAGE_SIZE) {
13351335
pr_err("template (%u) too big for buffer (%lu)\n",
1336-
*b_size, XBUFSIZE * PAGE_SIZE);
1336+
bs, XBUFSIZE * PAGE_SIZE);
13371337
goto out;
13381338
}
13391339

@@ -1386,8 +1386,7 @@ static void test_mb_skcipher_speed(const char *algo, int enc, int secs,
13861386
memset(cur->xbuf[p], 0xff, k);
13871387

13881388
skcipher_request_set_crypt(cur->req, cur->sg,
1389-
cur->sg, *b_size,
1390-
iv);
1389+
cur->sg, bs, iv);
13911390
}
13921391

13931392
if (secs) {

0 commit comments

Comments
 (0)