From patchwork Tue Jun 7 12:17:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 9161011 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 31D7060801 for ; Tue, 7 Jun 2016 12:19:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22A5326861 for ; Tue, 7 Jun 2016 12:19:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17397281F9; Tue, 7 Jun 2016 12:19:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC92F26861 for ; Tue, 7 Jun 2016 12:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161321AbcFGMSs (ORCPT ); Tue, 7 Jun 2016 08:18:48 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33010 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161317AbcFGMSq (ORCPT ); Tue, 7 Jun 2016 08:18:46 -0400 Received: by mail-pa0-f42.google.com with SMTP id ec8so39833682pac.0 for ; Tue, 07 Jun 2016 05:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Vl90fhDP1oN/95ggGPrdiI5tmS9g+QTqmrAhR2MvBxQ=; b=ZP/PFjEH4jFO9AZHeAv6X2iqVRDkKHebVCv3leGwn6SFrSTa13PQ3TmTkJRM02QdKf ahkJ+uGBfnOg9ItpjzYtEOoqilr98iq9Ib0ThjG1u69N80+cVqmd0aK3xPGom5dzu5UZ bs8xJgcekeMUskr63CTHkNWOZXx4qFodxqfEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Vl90fhDP1oN/95ggGPrdiI5tmS9g+QTqmrAhR2MvBxQ=; b=Hu5HF/VxSDN7bLv0fngbRkqGG7/NvoVLH3XD/bSVkF6dW7q/bM5TMh81iBr3RLrk4E uAnyFecl0dJayY62sACJiCGz421GD76CEgA6c45LwBUhxv00sLyVIs8VAKIF0+Re0GqA C8xpAj3/oO0/oWn1UHU6K3ozmwR4A3zLc+FnxcwyjE1lTDwTA30v6mrFRnM7NmHIvuz9 WHslEUNqVu/tj5bt+irBcFdCXAnLma77z/Mh2BfwHOk7T6IV1JukCuU8YnNaBzFILzLy zZA3Q7CdKNsq7r6qn0NmYeSvGep49yfxi63FAEvK3EULjpQaqqL3MtfiSNpiTGqWdqDF yM0g== X-Gm-Message-State: ALyK8tI8ZlDlPjQTC2SnwAgNr4D9HJmhiaki6ZhiEWHicuL2JbbiCqMY+t3YDKeoPQDngpdI X-Received: by 10.66.172.49 with SMTP id az17mr502381pac.104.1465301925744; Tue, 07 Jun 2016 05:18:45 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id r64sm34995877pfi.54.2016.06.07.05.18.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 05:18:44 -0700 (PDT) From: Baolin Wang To: axboe@kernel.dk, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net Cc: ebiggers3@gmail.com, js1304@gmail.com, tadeusz.struk@intel.com, smueller@chronox.de, standby24x7@gmail.com, shli@kernel.org, dan.j.williams@intel.com, martin.petersen@oracle.com, sagig@mellanox.com, kent.overstreet@gmail.com, keith.busch@intel.com, tj@kernel.org, ming.lei@canonical.com, broonie@kernel.org, arnd@arndb.de, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [RFC v4 4/4] crypto: Add the CRYPTO_ALG_BULK flag for ecb(aes) cipher Date: Tue, 7 Jun 2016 20:17:07 +0800 Message-Id: <1c7f3a872ce0382add0d5fc88b797eb3c2ab37f5.1465301616.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the ecb(aes) cipher does not need to handle the IV things for encryption or decryption, that means it can support for bulk block when handling data. Thus this patch adds the CRYPTO_ALG_BULK flag for ecb(aes) cipher to improve the hardware aes engine's efficiency. Signed-off-by: Baolin Wang --- drivers/crypto/omap-aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index ce174d3..ab09429 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -804,7 +804,7 @@ static struct crypto_alg algs_ecb_cbc[] = { .cra_priority = 300, .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | - CRYPTO_ALG_ASYNC, + CRYPTO_ALG_ASYNC | CRYPTO_ALG_BULK, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct omap_aes_ctx), .cra_alignmask = 0,