All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, linux-crypto@vger.kernel.org
Subject: Re: [RFC] [PATCH 4/4] esp: add the pcrypt hooks to esp
Date: Mon, 30 Mar 2009 14:22:33 +0200	[thread overview]
Message-ID: <20090330122233.GD6791@secunet.com> (raw)
In-Reply-To: <20090327084457.GC27903@gondor.apana.org.au>

On Fri, Mar 27, 2009 at 04:44:57PM +0800, Herbert Xu wrote:
> On Mon, Mar 16, 2009 at 12:55:26PM +0100, Steffen Klassert wrote:
> >
> > @@ -447,7 +448,7 @@ static int esp_init_aead(struct xfrm_state *x)
> >  	struct crypto_aead *aead;
> >  	int err;
> >  
> > -	aead = crypto_alloc_aead(x->aead->alg_name, 0, 0);
> > +	aead = crypto_alloc_aead_tfm(x->aead->alg_name, 0, 0);
> 
> I'd like this to be configurable.  After all, there's not much
> point in doing this if your crypto is done through PCI.
> 

Indeed, it should be configurable. I was not sure what's the best way to     
make it configurable, so I decided to just make it the default to be
able to use it in this first version.

> The easiest way is to let the user specify pcrypt through the
> algorithm name.  In fact, as long as pcrypt has a higher priority
> than the default software algorithms, the user simply has to
> instantiate it in order for it to be the default for all uses
> of that algorithm.
> 

For IPsec I thought about something like 'pcrypt(authenc(...,...))' to
be able to process each crypto request with just one
parallelization/serialization call. Perhaps I'm missing something, but
actually I don't see how to choose for this from userspace through the
name without adding an entry for each possible combination of hmac and
blkcipher algorithm to the xfrm_aead_list. I'd appreciate any hint here.
My idea to make it configurable was to do it similar to the async
algorithms by

aead = crypto_alloc_aead_tfm(x->aead->alg_name, flags, CRYPTO_ALG_PCRYPT);

if CRYPTO_ALG_PCRYPT is set in flags, the crypto manager tries to choose
a parallel algorithm, if it is not set parallel algorithms will be ignored.
~    

      reply	other threads:[~2009-03-30 12:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 11:49 [RFC] [PATCH 0/4] Parallel IPsec Steffen Klassert
2009-03-16 11:51 ` [RFC] [PATCH 1/4] padata: generic interface for parallel processing Steffen Klassert
2009-03-16 11:52 ` [RFC] [PATCH 2/4] cpu_chainiv: add percpu IV chain genarator Steffen Klassert
2009-03-27  8:36   ` Herbert Xu
2009-03-30 11:54     ` Steffen Klassert
2009-03-30 13:19       ` Herbert Xu
2009-03-30 14:49         ` Steffen Klassert
2009-04-08 11:40         ` Steffen Klassert
2009-04-09  3:20           ` Herbert Xu
2009-04-14 13:05             ` Steffen Klassert
2009-03-16 11:54 ` [RFC] [PATCH 3/4] pcrypt: Add pcrypt crypto parallelization engine Steffen Klassert
2009-03-16 11:55 ` [RFC] [PATCH 4/4] esp: add the pcrypt hooks to esp Steffen Klassert
2009-03-27  8:44   ` Herbert Xu
2009-03-30 12:22     ` Steffen Klassert [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=20090330122233.GD6791@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.