From: David Miller <davem@davemloft.net>
To: christophe.gouault@6wind.com
Cc: netdev@vger.kernel.org
Subject: Re: IPsec: Why do pfkey_getspi and xfrm_alloc_userspi call xfrm_find_acq_byseq?
Date: Sun, 22 Aug 2010 00:53:53 -0700 (PDT) [thread overview]
Message-ID: <20100822.005353.260099324.davem@davemloft.net> (raw)
In-Reply-To: <4C6D29B9.5070403@6wind.com>
From: Christophe Gouault <christophe.gouault@6wind.com>
Date: Thu, 19 Aug 2010 14:55:21 +0200
> The call to xfrm_find_acq_byseq() by the pfkey_getspi() and
> xfrm_alloc_userspi() functions is quite costly and proves to entail
> scalability issues when performing thousands of IKE negotiations with
> racoon (from ipsec-tools distribution) or charon (from strongswan
> distribution).
>
> Removing this call in the kernel drastically accelerates the
> processing and does not seem to entail functional problems.
>
> For now, I don't see the point of this call. I need to understand its
> purpose, because I'm highly tempted to simply remove it.
First of all, removing a function because you don't understand
why it's there is rarely a good idea :-)
I think the semantics require that we check for existing ACQUIRE
state entries before we allocate an SPI.
The likelyhood of breaking something if you remove the call is very
high.
next prev parent reply other threads:[~2010-08-22 7:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 12:55 IPsec: Why do pfkey_getspi and xfrm_alloc_userspi call xfrm_find_acq_byseq? Christophe Gouault
2010-08-22 7:53 ` David Miller [this message]
2010-08-23 13:30 ` Christophe Gouault
2010-08-23 14:47 ` Christophe Gouault
2010-09-12 18:47 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-08-17 8:46 Christophe Gouault
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=20100822.005353.260099324.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=christophe.gouault@6wind.com \
--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).