From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Hsieh, Che-Min" <cheminh@qti.qualcomm.com>
Cc: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>,
Garg Vakul-B16394 <B16394@freescale.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: Questions about the Crypto API
Date: Sat, 10 Aug 2013 11:15:41 +1000 [thread overview]
Message-ID: <20130810011541.GA6549@gondor.apana.org.au> (raw)
In-Reply-To: <A83C99F8370D4D42BEB2D2B3153A6BBC23D55A6E@NASANEXD02C.na.qualcomm.com>
On Fri, Aug 09, 2013 at 01:09:12PM +0000, Hsieh, Che-Min wrote:
> Marcelo/Herbert:
>
> I believe It is. Herbert, please correct me if I am wrong.
> A single tfm is used as a user context to crypto, so to speak. But a user is not a thread.
> Let us use ipsec as example.
> For each security association (SA), it will take up a tfm.
> Assume I have IP sec setup between my local host and remote host. I might have two SA's, one for each direction.
> Now, I might run ping. Simultaneously, I might run iperf. I might run a lot of different things between these two ip hosts.
> But only two tfm's are involved.
> I have seen this happening in our system with ipsec setup as described above.
> While an async request is outstanding in the driver, another request is issued to the same driver for the same tfm.
Yes you're absolutely right.
Unless I've misunderstood Marcelo's question is different from
what Garg was asking.
Marcelo: The tfm, be it blkcipher or ablkcipher can always be used
in parallel by the user on different CPUs. For example, IPsec may
receive two packets on two CPUs through the same SA, in which case
decryption will be carried out in parallel.
Garg: For any tfm, blkcipher or ablkcipher, they must return results
in the order they were given. For a blkcipher which is synchronous,
this is always true by definition since we return only after the
result has been completed. For an async ablkcipher, this means that
if you receive two requests on the same CPU, then the first request
must be served and completed before the second request's completion
can be initiated.
Sorry for any confusion this might have caused.
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
next prev parent reply other threads:[~2013-08-10 1:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 20:25 Questions about the Crypto API Marcelo Cerri
2013-08-06 7:00 ` Herbert Xu
2013-08-06 12:05 ` Marcelo Cerri
2013-08-06 14:16 ` Marcelo Cerri
2013-08-08 5:01 ` Herbert Xu
2013-08-08 14:04 ` Hsieh, Che-Min
2013-08-10 1:21 ` Herbert Xu
2013-08-10 2:15 ` Hsieh, Che-Min
2013-08-10 6:17 ` Herbert Xu
2013-08-08 5:02 ` Herbert Xu
2013-08-08 14:50 ` Garg Vakul-B16394
2013-08-09 12:55 ` Marcelo Cerri
[not found] ` <A83C99F8370D4D42BEB2D2B3153A6BBC23D55A6E@NASANEXD02C.na.qualcomm.com>
2013-08-10 1:15 ` Herbert Xu [this message]
2013-08-12 13:49 ` Marcelo Cerri
2013-08-13 19:25 ` Hsieh, Che-Min
2013-08-16 6:37 ` Herbert Xu
2013-08-16 6:30 ` Herbert Xu
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=20130810011541.GA6549@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=B16394@freescale.com \
--cc=cheminh@qti.qualcomm.com \
--cc=linux-crypto@vger.kernel.org \
--cc=mhcerri@linux.vnet.ibm.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