From: Christian Lamparter <chunkeey@googlemail.com>
To: Ben Greear <greearb@candelatech.com>
Cc: Jouni Malinen <j@w1.fi>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: Looking for non-NIC hardware-offload for wpa2 decrypt.
Date: Sat, 23 Aug 2014 00:55:33 +0200 [thread overview]
Message-ID: <9037207.4PQkPrEdZH@debian64> (raw)
In-Reply-To: <53F50D63.2040500@candelatech.com>
On Wednesday, August 20, 2014 02:04:35 PM Ben Greear wrote:
> On 08/20/2014 01:47 PM, Christian Lamparter wrote:
>
> > I'll look into the assembler implementation of aes-ccm. But I'm
> > afraid that this won't increase the throughput (and only decrease
> > the load on the CPU a bit).
>
> I think you are right, and probably it is not worth much effort at
> this point, at least as far as my setup is concerned.
"There's a test bench tool (tcrypt) to measure the performance
of any cipher. It would be interesting to know what the
performance/throughput it can produce without the overhead
of any application. ..."
here it is: the module is located in crpyto/tcrypt
module parameters:
- mode=212 (original ccm)
- mode=213 (ccm-aesni)
(sec=1 - Length in seconds of speed tests)
This will test the speed of the ccm implementation at
different block sizes for one second.
BTW: any luck with figuring out, if there are any other obvious
bottlenecks? (Other than: btserver, checksumming, ...)?
Regards
Christian
---
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 890449e..7675a13 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -354,8 +354,10 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs,
ret = crypto_aead_setauthsize(tfm, authsize);
iv_len = crypto_aead_ivsize(tfm);
- if (iv_len)
- memset(&iv, 0xff, iv_len);
+ if (iv_len) {
+ for (j = 0; j < iv_len; j++)
+ iv[j] = j + 1;
+ }
crypto_aead_clear_flags(tfm, ~0);
printk(KERN_INFO "test %u (%d bit key, %d byte blocks): ",
@@ -1751,6 +1753,15 @@ static int do_test(int m)
NULL, 0, 16, 8, aead_speed_template_20);
break;
+ case 212:
+ test_aead_speed("ccm_base(ctr(aes-aesni),aes-aesni)", ENCRYPT, sec,
+ NULL, 0, 16, 8, aead_speed_template_16);
+ break;
+ case 213:
+ test_aead_speed("ccm-aes-aesni", ENCRYPT, sec,
+ NULL, 0, 16, 8, aead_speed_template_16);
+ break;
+
case 300:
/* fall through */
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 6c7e21a..88f152d 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -66,6 +66,7 @@ static u8 speed_template_32_64[] = {32, 64, 0};
* AEAD speed tests
*/
static u8 aead_speed_template_20[] = {20, 0};
+static u8 aead_speed_template_16[] = {16, 0};
/*
* Digest speed tests
next prev parent reply other threads:[~2014-08-22 22:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 4:40 Looking for non-NIC hardware-offload for wpa2 decrypt Ben Greear
2014-03-31 18:09 ` Christian Lamparter
2014-07-28 20:50 ` Ben Greear
2014-07-29 22:29 ` Christian Lamparter
2014-07-29 22:50 ` Ben Greear
2014-07-30 18:59 ` Christian Lamparter
2014-07-30 19:08 ` Ben Greear
2014-07-31 20:05 ` Jouni Malinen
2014-07-31 20:45 ` Christian Lamparter
2014-08-05 23:09 ` Ben Greear
2014-08-07 14:05 ` Christian Lamparter
2014-08-07 17:45 ` Ben Greear
2014-08-10 13:44 ` Christian Lamparter
2014-08-12 18:34 ` Ben Greear
2014-08-14 12:39 ` Christian Lamparter
2014-08-14 17:09 ` Ben Greear
2014-08-19 18:18 ` Ben Greear
2014-08-20 20:47 ` Christian Lamparter
2014-08-20 21:04 ` Ben Greear
2014-08-22 22:55 ` Christian Lamparter [this message]
2014-07-30 7:06 ` Johannes Berg
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=9037207.4PQkPrEdZH@debian64 \
--to=chunkeey@googlemail.com \
--cc=greearb@candelatech.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.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;
as well as URLs for NNTP newsgroup(s).