From: David Miller <davem@davemloft.net>
To: nakam@linux-ipv6.org
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
usagi-core@linux-ipv6.org
Subject: Re: [PATCH][XFRM] Fixes for net-2.6
Date: Tue, 03 Oct 2006 15:55:04 -0700 (PDT) [thread overview]
Message-ID: <20061003.155504.126762903.davem@davemloft.net> (raw)
In-Reply-To: <4521D932.8050502@linux-ipv6.org>
From: Masahide NAKAMURA <nakam@linux-ipv6.org>
Date: Tue, 03 Oct 2006 12:29:54 +0900
> [XFRM] POLICY: Fix per-direction policy counter after flushing.
>
> Currently when xfrm_policy_flush() is called per-direction
> policy counter is cleared. However flusing policy is performed
> for each type (i.e. main or sub) then it is not always true
> to make the counter zero.
>
> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
The idea of this code is to avoid updating global state many
many times during such a flush. This can be expensive and
cause much SMP cacheline activity as other cpus read the
counter in the routing lookup path.
I think what I'll do is reimplement this patch so that a local
variable is used to maintain how many entries were removed,
and then simply subtract that counter from xfrm_policy_count[dir]
at the very end where the assignment to zero occurs.
> [XFRM] STATE: Use destination address for src hash.
>
> Src hash is introduced for Mobile IPv6 route optimization usage.
> On current kenrel code it is calculated with source address only.
> It results we uses the same hash value for outbound state (when
> the node has only one address for Mobile IPv6).
> This patch use also destination address as peer information for
> src hash to be dispersed.
>
> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
This patch is fine, I will apply this, thank you.
next prev parent reply other threads:[~2006-10-03 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 3:29 [PATCH][XFRM] Fixes for net-2.6 Masahide NAKAMURA
2006-10-03 22:55 ` David Miller [this message]
2006-10-04 2:08 ` Masahide NAKAMURA
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=20061003.155504.126762903.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=nakam@linux-ipv6.org \
--cc=netdev@vger.kernel.org \
--cc=usagi-core@linux-ipv6.org \
--cc=yoshfuji@linux-ipv6.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).