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: 9161005 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 7B64360801 for ; Tue, 7 Jun 2016 12:19:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CCCA281D2 for ; Tue, 7 Jun 2016 12:19:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61855281F9; Tue, 7 Jun 2016 12:19:03 +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 D0B3C281FE for ; Tue, 7 Jun 2016 12:19:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161323AbcFGMSs (ORCPT ); Tue, 7 Jun 2016 08:18:48 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35193 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161291AbcFGMSq (ORCPT ); Tue, 7 Jun 2016 08:18:46 -0400 Received: by mail-pa0-f50.google.com with SMTP id xk1so45672192pac.2 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=iSAjBaE3zY9SaakTIP/b1vqvZGKT1I+/CAKKSasJDl3c0S+HRoisLG9ur+cP8775jQ haBBBRvnqkkkcr9UC67fIT5WC0xsxwkMe2SGh3bBl5i9vUEtyQwMHM+J9adwtNDebVPH v8MjXkz6hO7al54d3sARdppLWBQEk2OgvMXFohRAVDPrIFA9zBk8t8qYd4AthzpS7cZC zrTuuyw7rwsbF90YwYXnFlAZjquNK7fI+9RqufIlS1BDDADaOGfnU892UAdvw8U8nrZm wU/IkzMQR9MpLCWdO9h46CiMox2UxVWuHYVsEhBcmagVOhtIKshN64TjphlnYQhbPRKf bvwA== X-Gm-Message-State: ALyK8tIOmFAccaZUqY4pJbzvur8445IcuIrMVVMjd5pPqML1E45OkLQ8lAQBcrkkkd8KNv7D 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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,