From: "Horia Geantă" <horia.geanta@freescale.com>
To: Alex Porosanu <alexandru.porosanu@freescale.com>,
<linux-crypto@vger.kernel.org>
Cc: <mircea.pop@freescale.com>, <herbert@gondor.apana.org.au>
Subject: Re: [PATCH v3] crypto/caam: add backlogging support
Date: Mon, 21 Sep 2015 11:20:43 +0300 [thread overview]
Message-ID: <55FFBDDB.9000500@freescale.com> (raw)
In-Reply-To: <1442653336-8527-1-git-send-email-alexandru.porosanu@freescale.com>
On 9/19/2015 12:02 PM, Alex Porosanu wrote:
> caam_jr_enqueue() function returns -EBUSY once there are no
> more slots available in the JR, but it doesn't actually save
> the current request. This breaks the functionality of users
> that expect that even if there is no more space for the request,
> it is at least queued for later execution. In other words, all
> crypto transformations that request backlogging
> (i.e. have CRYPTO_TFM_REQ_MAY_BACKLOG set), will hang. Such an
> example is dm-crypt.
> The current patch solves this issue by setting a threshold after
> which caam_jr_enqueue() returns -EBUSY, but since the HW job ring
> isn't actually full, the job is enqueued.
> Caveat: if the users of the driver don't obey the API contract which
> states that once -EBUSY is received, no more requests are to be
> sent, eventually the driver will reject the enqueues.
> For well-behaved CryptoAPI users, like dm-crypt, this is not the
> case, since the processing thread will sleep once -EBUSY is
> received.
>
> Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
>
> ---
> v3:
> - as per Herbert's observation, allow only # of backlogging slots
> transformations w/MAY_BACKLOG flag set to be affined to a JR;
> the total # of transformations that can be thus allocated is equal
> to the # of JRs times the # of "backlogging slots". In the standard
> configuration, this means 16 x 4 = 64 transformations.
This won't work, since CRYPTO_TFM_REQ_MAY_BACKLOG is set per request (at
request setup time), not per tfm.
Horia
prev parent reply other threads:[~2015-09-21 8:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-19 9:02 [PATCH v3] crypto/caam: add backlogging support Alex Porosanu
2015-09-21 8:20 ` Horia Geantă [this message]
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=55FFBDDB.9000500@freescale.com \
--to=horia.geanta@freescale.com \
--cc=alexandru.porosanu@freescale.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=mircea.pop@freescale.com \
/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).