From: Masahide NAKAMURA <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>

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 <[EMAIL PROTECTED]>

This patch is fine, I will apply this, thank you.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to