]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfrm: policy: remove remaining use of inexact list
authorFlorian Westphal <fw@strlen.de>
Thu, 22 Aug 2024 13:04:32 +0000 (15:04 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Sat, 24 Aug 2024 07:57:55 +0000 (09:57 +0200)
commita54ad727f74559f7c3dfcfd2a63d0ce7683a82e8
treec9b6d360628828a71c8c8a034ca5d96b6e10359e
parent563d5ca93e883b9dcb4b7dc8967ac569fd91820d
xfrm: policy: remove remaining use of inexact list

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: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_policy.c