• Florian Westphal's avatar
    xfrm: policy: remove remaining use of inexact list · a54ad727
    Florian Westphal authored
    No consumers anymore, remove it.  After this, insertion of policies
    no longer require list walk of all inexact policies but only those
    that are reachable via the candidate sets.
    
    This gives almost linear insertion speeds provided the inserted
    policies are for non-overlapping networks.
    
    Before:
    Inserted 1000   policies in 70 ms
    Inserted 10000  policies in 1155 ms
    Inserted 100000 policies in 216848 ms
    
    After:
    Inserted 1000   policies in 56 ms
    Inserted 10000  policies in 478 ms
    Inserted 100000 policies in 4580 ms
    
    Insertion of 1m entries takes about ~40s after this change
    on my test vm.
    
    Cc: Noel Kuntze <noel@familie-kuntze.de>
    Cc: Tobias Brunner <tobias@strongswan.org>
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    a54ad727
xfrm_policy.c 111 KB