lkml.org 
[lkml]   [2019]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/12] crypto: caam - support crypto_engine framework for SKCIPHER algorithms
On Mon, Nov 18, 2019 at 12:30:41AM +0200, Iuliana Prodan wrote:
>
> +static int transfer_request_to_engine(struct crypto_engine *engine,
> + struct crypto_async_request *req)
> +{
> + switch (crypto_tfm_alg_type(req->tfm)) {
> + case CRYPTO_ALG_TYPE_SKCIPHER:
> + return crypto_transfer_skcipher_request_to_engine(engine,
> + skcipher_request_cast(req));
> + default:
> + return -EINVAL;
> + }
> +}

Please don't do this. As you can see the crypto engine interface
wants to you to use the correct type for the request object. That's
what you should do to.

In fact I don't understand why you're only using the crypto engine
for the backlog case. Wouldn't it be much simpler if you used the
engine unconditionally?

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2019-11-22 11:34    [W:0.445 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site