Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 6be3b0d

Browse files
Florian Westphalklassert
authored andcommitted
xfrm: policy: add inexact policy search tree infrastructure
At this time inexact policies are all searched in-order until the first match is found. After removal of the flow cache, this resolution has to be performed for every packetm resulting in major slowdown when number of inexact policies is high. This adds infrastructure to later sort inexact policies into a tree. This only introduces a single class: any:any. Next patch will add a search tree to pre-sort policies that have a fixed daddr/prefixlen, so in this patch the any:any class will still be used for all policies. Signed-off-by: Florian Westphal <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent b5fe22e commit 6be3b0d

File tree

2 files changed

+248
-54
lines changed

2 files changed

+248
-54
lines changed

include/net/xfrm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ struct xfrm_policy {
577577
/* This lock only affects elements except for entry. */
578578
rwlock_t lock;
579579
refcount_t refcnt;
580+
u32 pos;
580581
struct timer_list timer;
581582

582583
atomic_t genid;

0 commit comments

Comments
 (0)