netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Huth <mhuth@mvista.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH][af_key]pfkey_add: Optimize SA adds and algorithm probes
Date: Thu, 24 May 2007 17:15:30 -0700	[thread overview]
Message-ID: <46562AA2.8030102@mvista.com> (raw)
In-Reply-To: <20070518212148.GA25363@gondor.apana.org.au>




Herbert Xu wrote:
> On Fri, May 18, 2007 at 02:34:12PM +1000, Herbert Xu wrote:
>> Actually, I think we should just probe for the specific algorithm
>> requested rather than everything.  See patch below.
> 
> Doh, forgot to actually remove the probe call :)
> 
> [IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all
> 
> This is a natural extension of the changeset
> 
>     [XFRM]: Probe selected algorithm only.
> 
> which only removed the probe call for xfrm_user.  This patch does exactly
> the same thing for af_key.  In other words, we load the algorithm requested
> by the user rather than everything when adding xfrm states in af_key.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> Cheers,

[... snip]

Herbert,

I can verify that this works.  The test adds 2000 instances of SAs using
hmac-md5 for authentication and rijndael-cbc for encryption.
Test output is:

root@192.168.150.94:~# lsmod
Module                  Size  Used by
root@192.168.150.94:~#time setkey -f SA_test.txt

real    0m1.072s
user    0m0.048s
sys     0m0.632s
root@192.168.150.94:~#lsmod
Module                  Size  Used by
twofish                10112  0
twofish_common         40192  1 twofish
camellia               32768  0
serpent                25216  0
blowfish                9984  0
ecb                     3712  0
aes                    28864  2000
xcbc                    5768  0
sha256                 12416  0
crypto_null             3456  0

root@192.168.150.94:~#

Prior to the patch time was over 42 seconds (possibly longer on 2.6.21).

I'm a bit curious why all of the crypto modules got loaded, but it 
doesn't matter.

Thanks for the patch.

Mark Huth

  parent reply	other threads:[~2007-05-25  0:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  1:56 [PATCH][af_key]pfkey_add: Optimize SA adds and algorithm probes Mark Huth
2007-05-18  4:34 ` Herbert Xu
2007-05-18 17:16   ` Mark Huth
2007-05-18 21:21   ` Herbert Xu
2007-05-19 21:21     ` David Miller
2007-05-25  0:15     ` Mark Huth [this message]
2007-05-25  0:20       ` Herbert Xu
2007-05-25  0:36       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2007-05-11  0:59 Mark Huth

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=46562AA2.8030102@mvista.com \
    --to=mhuth@mvista.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@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).