Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5244667ybl; Tue, 14 Jan 2020 06:00:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzYbOtH1CcuLqeQM9TnsPG9THnwKToTNdqoIhXzS++x53oXeZBP/3fD5H0D5+Z4m4fviXFX X-Received: by 2002:a05:6830:174e:: with SMTP id 14mr16361785otz.142.1579010404326; Tue, 14 Jan 2020 06:00:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579010404; cv=none; d=google.com; s=arc-20160816; b=D/55A2lmobjffa371SIp9FSl9SvZAScl1EjHOGPYp5401sLx6amWivKQoLHVrrTjJ+ xP3TLeF/GgNVtkhp9sK7aMXyY2kVYsvlspU3kAY3fX7FodgwDu0JC8cyMy8Vb6wWQwHJ VC7nHs+xdUsppfyEgIBkhHkGukpqzLi60KR5ulHZVkUnQssOnkdsAq1cYWT9N6lK+MNy 6RgmRXkR9iZjesDyLbjS1m2zid31UpFYr+7V8p7v2BA9S9urCaUkiPRc4fO5VpqLt6Ew ajAA/UsJeVkfuzhORHwNeS654URmqXnfz9ARhs0eXO4/OlzjDfCm86DF9A/k7R7RFbPv y7ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WxdkQ4fln/Ubg69SQWZPku8d8xfNPtcWo6lDszFAgoU=; b=UtJXpcDiSHgcX9HTuxnfADtWHqDvWqa0VzuFETw9boyklN1B80Fh1pnAWo1hRtFUjK 2aBT+CUumH+tYugeAv/VxYsb4++FKLCy6u8CFxg16WU43/cFW1iXL+RlGJx+BHPuuacX Hi998fYKdVUqZifGQvLalpNCC6nMN3JKJ0rcCXuAUyuwVV71cLatfcvFEy1DyS+Sgle4 qcWT7jyscVgwmBw4djSMW5U+fjOq2SYPKEkqt3CBom33/mIC2/L332f9RLG2AsDoc3us TeoSAmP1bOa58mp8LkBW74b5NC2ZZHK80Bpwp8J+le17xy8HUm3E8u9oU17cEj8AUWLB /8Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W5yD7THh; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si8330238otq.31.2020.01.14.05.59.53; Tue, 14 Jan 2020 06:00:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W5yD7THh; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728739AbgANN7w (ORCPT + 99 others); Tue, 14 Jan 2020 08:59:52 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:36852 "EHLO mail-wm1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbgANN7w (ORCPT ); Tue, 14 Jan 2020 08:59:52 -0500 Received: by mail-wm1-f41.google.com with SMTP id p17so13869409wma.1; Tue, 14 Jan 2020 05:59:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WxdkQ4fln/Ubg69SQWZPku8d8xfNPtcWo6lDszFAgoU=; b=W5yD7THh9GoPrqpAR+V6A99baoCffIA80ESDKdfUT4jQ43HWe7mgvJtpFBECNzWpfo bz8xxkmz7NEenvBfXfcRuOdyeWxr/pUVVyFOh9D5p9Nqf4DNNkAg8yMwt2KipmDXSA4m F/Xi7b8c+8LkgBp35W80e9OVXqAPJNH2bBe+He6wKRT0YZa0l/hFhJpvHkcEUovLUEpi UHyC1DShgeL4HbPe4cvV8l153bzO81NZY3bLWpc1uh9L8pOP8grJOHDrSBs/SEUo7Q/G C6IkbFOdSBNykmToWLZSS6dvZWgV7mwwdZTUK+lIjdgNba/X1T0dVEkSEzSu50mSY97i xWOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WxdkQ4fln/Ubg69SQWZPku8d8xfNPtcWo6lDszFAgoU=; b=MQPDaq883hDxv/L/2ACMJZQ2Bmg6p18NXzsPxP8T2LjCnCy32wmf3b62J1rtzIEMVp GEeEO022/ZMN80jUWChj181jxa69Ngd5ZpPstZeMkkjIZFWIIa7kLLzM+3ZDZ/nkryQE NcAoAcJK6BxENuRKyYQzS1ScZhFNvG4X2CA/V/69eqdROPcfU4TMW5YKA/dUBY6Aog8V Xwn0kDLa3iSkhQ68zmxHUkIeaf9jabJIJxrqZDhkF7oMezqFm6s8Q1/WWl5kgD4a0Cus jmrzLAM2d61SiDZPh54RuH7yTqQ5mB0kvMPXPUqtg086pmMO1SH3DYEkcovnMIhwbOQk oTww== X-Gm-Message-State: APjAAAUqLadIONRnjWOpae8X//iqp9dNK4ZwpwlHvbshi4TCfd9Dxhb4 tAwH/W0dRs02ANYR/ILLJPM= X-Received: by 2002:a05:600c:20e:: with SMTP id 14mr19620970wmi.104.1579010389767; Tue, 14 Jan 2020 05:59:49 -0800 (PST) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id 4sm17854448wmg.22.2020.01.14.05.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 05:59:49 -0800 (PST) From: Corentin Labbe To: alexandre.torgue@st.com, davem@davemloft.net, herbert@gondor.apana.org.au, mcoquelin.stm32@gmail.com, mripard@kernel.org, wens@csie.org, iuliana.prodan@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH RFC 00/10] crypto: engine: permit to batch requests Date: Tue, 14 Jan 2020 14:59:26 +0100 Message-Id: <20200114135936.32422-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello The sun8i-ce hardware can work on multiple requests in one batch. For this it use a task descriptor, and chain them. For the moment, the driver does not use this mechanism and do requests one at a time and issue an irq for each. Using the chaning will permit to issue less interrupts, and increase thoughput. But the crypto/engine can enqueue lots of requests but can ran them only one by one. This serie introduce a way to batch requests in crypto/engine by - setting a batch limit (1 by default) - refactor the prepare/unprepare code to permit to have x requests prepared/unprepared at the same time. For testing the serie, the selftest are not enough, since it issue request one at a time. I have used LUKS for testing it. Please give me what you think about this serie, specially maintainers which have hardware with the same kind of capability. Regards Corentin Labbe (10): crypto: sun8i-ce: move iv data to request context crypto: sun8i-ce: increase task list size crypto: sun8i-ce: split into prepare/run/unprepare crypto: sun8i-ce: introduce the slot number crypto: engine: transform cur_req in an array crypto: engine: introduce ct crypto: sun8i-ce: handle slot > 0 crypto: engine: add slot parameter crypto: engine: permit to batch requests crypto: sun8i-ce: use the new batch mechanism crypto/crypto_engine.c | 76 +++++++---- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 121 +++++++++++++----- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 17 ++- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 17 ++- drivers/crypto/omap-aes-gcm.c | 2 +- drivers/crypto/omap-aes.c | 4 +- drivers/crypto/omap-des.c | 4 +- drivers/crypto/stm32/stm32-cryp.c | 8 +- drivers/crypto/stm32/stm32-hash.c | 4 +- include/crypto/engine.h | 27 +++- 10 files changed, 201 insertions(+), 79 deletions(-) -- 2.24.1