From: Horia Geanta <horia.geanta@nxp.com>
To: Iuliana Prodan <iuliana.prodan@nxp.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Aymen Sghaier <aymen.sghaier@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH v2 06/10] crypto: caam - refactor caam_jr_enqueue
Date: Wed, 8 Jan 2020 16:59:51 +0000 [thread overview]
Message-ID: <VI1PR0402MB34852528A105E1C472686078983E0@VI1PR0402MB3485.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 1578013373-1956-7-git-send-email-iuliana.prodan@nxp.com
On 1/3/2020 3:04 AM, Iuliana Prodan wrote:
> Added a new struct - caam_{skcipher, akcipher, ahash, aead}_request_entry,
> to keep each request information. This has a specific crypto request and
> a bool to check if the request has backlog flag or not.
> This struct is passed to CAAM, via enqueue function - caam_jr_enqueue.
>
> This is done for later use, on backlogging support in CAAM.
[...]
> diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
> index 21b6172..34662b4 100644
> --- a/drivers/crypto/caam/caamalg.c
> +++ b/drivers/crypto/caam/caamalg.c
> @@ -871,6 +871,17 @@ static int xts_skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,
> }
>
> /*
> + * caam_aead_request_entry - storage for tracking each aead request
> + * that is processed by a ring
> + * @base: common attributes for aead requests
> + * @bklog: stored to determine if the request needs backlog
> + */
> +struct caam_aead_request_entry {
> + struct aead_request *base;
> + bool bklog;
> +};
> +
> +/*
> * aead_edesc - s/w-extended aead descriptor
> * @src_nents: number of segments in input s/w scatterlist
> * @dst_nents: number of segments in output s/w scatterlist
> @@ -878,6 +889,7 @@ static int xts_skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,
> * @mapped_dst_nents: number of segments in output h/w link table
> * @sec4_sg_bytes: length of dma mapped sec4_sg space
> * @sec4_sg_dma: bus physical mapped address of h/w link table
> + * @jrentry: information about the current request that is processed by a ring
> * @sec4_sg: pointer to h/w link table
> * @hw_desc: the h/w job descriptor followed by any referenced link tables
> */
> @@ -888,11 +900,23 @@ struct aead_edesc {
> int mapped_dst_nents;
> int sec4_sg_bytes;
> dma_addr_t sec4_sg_dma;
> + struct caam_aead_request_entry jrentry;
> struct sec4_sg_entry *sec4_sg;
> u32 hw_desc[];
> };
>
Now that most of the backlogging logic moved from the backend (jr.c)
to frontends (caamalg.c, caamhash.c etc.), it looks like there's no need for
all the *_request_entry structures.
Instead, bklog flag could be added directly into the corresponding
*_edesc structure.
Horia
next prev parent reply other threads:[~2020-01-08 16:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 1:02 [PATCH v2 00/10] crypto: caam - backlogging support Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 01/10] crypto: caam - refactor skcipher/aead/gcm/chachapoly {en,de}crypt functions Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 02/10] crypto: caam - refactor ahash_done callbacks Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 03/10] crypto: caam - refactor ahash_edesc_alloc Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 04/10] crypto: caam - refactor RSA private key _done callbacks Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 05/10] crypto: caam - change return code in caam_jr_enqueue function Iuliana Prodan
2020-01-03 1:02 ` [PATCH v2 06/10] crypto: caam - refactor caam_jr_enqueue Iuliana Prodan
2020-01-08 16:59 ` Horia Geanta [this message]
2020-01-03 1:02 ` [PATCH v2 07/10] crypto: caam - support crypto_engine framework for SKCIPHER algorithms Iuliana Prodan
2020-01-10 8:12 ` Horia Geanta
2020-01-03 1:02 ` [PATCH v2 08/10] crypto: caam - add crypto_engine support for AEAD algorithms Iuliana Prodan
2020-01-10 8:31 ` Horia Geanta
2020-01-03 1:02 ` [PATCH v2 09/10] crypto: caam - add crypto_engine support for RSA algorithms Iuliana Prodan
2020-01-10 8:46 ` Horia Geanta
2020-01-13 9:48 ` Iuliana Prodan
2020-01-13 12:21 ` Horia Geanta
2020-01-13 13:06 ` Iuliana Prodan
2020-01-14 0:14 ` Herbert Xu
2020-01-14 10:40 ` Iuliana Prodan
2020-01-14 13:53 ` Corentin Labbe
2020-01-03 1:02 ` [PATCH v2 10/10] crypto: caam - add crypto_engine support for HASH algorithms Iuliana Prodan
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=VI1PR0402MB34852528A105E1C472686078983E0@VI1PR0402MB3485.eurprd04.prod.outlook.com \
--to=horia.geanta@nxp.com \
--cc=aymen.sghaier@nxp.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@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).