From: Patrick McHardy <kaber@trash.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [XFRM]: Fix wildcard as tunnel source
Date: Mon, 18 Sep 2006 09:51:21 +0200 [thread overview]
Message-ID: <450E4FF9.9030406@trash.net> (raw)
In-Reply-To: <20060918.001904.105429466.davem@davemloft.net>
David Miller wrote:
> Unfortunately, this break scalability of the xfrm state layer when the
> source is equally as varying as the destination. In such setups you
> have an enormous number of entries with destination being the local
> system and only the source address changing.
>
> BTW, how can the source be specified as wildcard? There is no prefix
> component, it is simply an xfrm_address_t. And there are several
> macros which check for x->props.saddr equality directly with no
> special prefixing or wildcard logic.
The tunnel endpoint in the template (either source or destination,
depending on the direction) is set to 0.0.0.0. For outbound SAs,
the address is compared using xfrm_state_addr_check(), which interprets
0.0.0.0 as wildcard. When no matching SA is present, the address
is resolved using routing and filled in the ACQ SA. The keying daemon
will then install SAs with the proper source. For inbound SAs the
tunnel destination from the template is ignored.
> I really don't want to remove this as it's fairly critical performance
> wise for the scalability problems all my changes were meant to address.
> I hope I really don't have to do something like what was needed for
> the policy layer, having a linked list and a hash table to handle the
> two cases.
We could query the address before the SA lookup. It will cost an
additional route lookup in case a matching SA is already present,
but I guess thats still better than removing the source from the
hash. I'll try if it works and send a new patch.
next prev parent reply other threads:[~2006-09-18 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-02 14:46 [XFRM]: Fix wildcard as tunnel source Patrick McHardy
2006-09-18 7:19 ` David Miller
2006-09-18 7:51 ` Patrick McHardy [this message]
2006-09-18 9:39 ` Patrick McHardy
2006-09-18 9:43 ` Patrick McHardy
2006-09-19 19:57 ` David Miller
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=450E4FF9.9030406@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--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).