From patchwork Fri Aug 22 22:55:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 4767451 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB6659F37E for ; Fri, 22 Aug 2014 22:55:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3D8720131 for ; Fri, 22 Aug 2014 22:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56129200F3 for ; Fri, 22 Aug 2014 22:55:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752341AbaHVWzj (ORCPT ); Fri, 22 Aug 2014 18:55:39 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:62541 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286AbaHVWzi (ORCPT ); Fri, 22 Aug 2014 18:55:38 -0400 Received: by mail-lb0-f169.google.com with SMTP id s7so10229112lbd.28 for ; Fri, 22 Aug 2014 15:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding:content-type; bh=n8vTUf0Eb4iAWsbudb00nImjByvfxRyHkCn412UuFUY=; b=ZY71XPEehadNPNeTpWuulslKFmTC+OvxFU+y/W8+VYOUshD+WUihZCd7w1Xm/+g8aM 6cuvUN5+d9K43PVXqJ6iGGwuXl/PUz+oPKje7dk5qlmFvhVlmlkOhXSHye09EOO4RFkJ iWaoqzuIWu6doIXP1vXUiUl2Y9pcj3AHle/GEDAVUjRD91+gXrL0pqun2Uosl05Pmw05 7wOPFGpqYBDbBEPQmDy3lagYR04+/bIS6tVM/z8ZU51qmUEczpaYlExxkA6uiycm/QL1 mNwofWlLojkv76wE74mQzeGGvd928UzWOaTUpSUhzcPZLPTuI1NDj9EBErx6doqj4nNw +Kbw== X-Received: by 10.112.118.68 with SMTP id kk4mr6831557lbb.4.1408748136642; Fri, 22 Aug 2014 15:55:36 -0700 (PDT) Received: from debian64.daheim (p5B2E73F2.dip0.t-ipconnect.de. [91.46.115.242]) by mx.google.com with ESMTPSA id e7sm18991979lae.9.2014.08.22.15.55.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Aug 2014 15:55:35 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1XKxk5-0004CV-So; Sat, 23 Aug 2014 00:55:33 +0200 From: Christian Lamparter To: Ben Greear Cc: Jouni Malinen , "linux-wireless@vger.kernel.org" , Johannes Berg Subject: Re: Looking for non-NIC hardware-offload for wpa2 decrypt. Date: Sat, 23 Aug 2014 00:55:33 +0200 Message-ID: <9037207.4PQkPrEdZH@debian64> User-Agent: KMail/4.13.3 (Linux/3.17.0-rc1-wl+; KDE/4.14.0; x86_64; ; ) In-Reply-To: <53F50D63.2040500@candelatech.com> References: <5338F1B8.5040305@candelatech.com> <1478683.D306USvBEk@debian64> <53F50D63.2040500@candelatech.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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