diff options
| author | Steffen Klassert <steffen.klassert@secunet.com> | 2024-08-27 08:01:20 +0300 |
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2024-08-27 08:01:20 +0300 |
| commit | 5ce90c842ef57bceb515503347306174e231575f (patch) | |
| tree | c9b6d360628828a71c8c8a034ca5d96b6e10359e /include | |
| parent | 54f2f78d6b9f1f90e91aaf5dbb34a6198f65fdfd (diff) | |
| parent | a54ad727f74559f7c3dfcfd2a63d0ce7683a82e8 (diff) | |
| download | linux-5ce90c842ef57bceb515503347306174e231575f.tar.xz | |
Merge branch 'xfrm: speed up policy insertions'
Florian Westphal says:
====================
Policy insertions do not scale well, due to both a lienar list walk
to find the insertion spot and another list walk to set the 'pos' value
(a tie-breaker to detect which policy is older when there is ambiguity
as to which one should be matched).
First patch gets rid of the second list walk on insert.
Rest of the patches get rid of the insertion walk.
This list walk was only needed because when I moved the policy db
implementation to rbtree I retained the old insertion method for the
sake of XFRM_MIGRATE.
Switching that to tree-based lookup avoids the need for the full
list search.
After this, insertion of a policy is largely independent of the number
of pre-existing policies as long as they do not share the same source/
destination networks.
Note that this is compile tested only as I did not find any
tests for XFRM_MIGRATE.
====================
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/xfrm.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index f7244ac4fa08..1fa2da22a49e 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -555,7 +555,6 @@ struct xfrm_policy { u16 family; struct xfrm_sec_ctx *security; struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; - struct hlist_node bydst_inexact_list; struct rcu_head rcu; struct xfrm_dev_offload xdo; |
