-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
4 changed files
with
175 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.