forked from svenkatr/linux
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flowcache: Make flow cache name space aware
Inserting a entry into flowcache, or flushing flowcache should be based on per net scope. The reason to do so is flushing operation from fat netns crammed with flow entries will also making the slim netns with only a few flow cache entries go away in original implementation. Since flowcache is tightly coupled with IPsec, so it would be easier to put flow cache global parameters into xfrm namespace part. And one last thing needs to do is bumping flow cache genid, and flush flow cache should also be made in per net style. Signed-off-by: Fan Du <fan.du@windriver.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
- Loading branch information
Showing
6 changed files
with
103 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef _NET_FLOWCACHE_H | ||
#define _NET_FLOWCACHE_H | ||
|
||
#include <linux/interrupt.h> | ||
#include <linux/types.h> | ||
#include <linux/timer.h> | ||
#include <linux/notifier.h> | ||
|
||
struct flow_cache_percpu { | ||
struct hlist_head *hash_table; | ||
int hash_count; | ||
u32 hash_rnd; | ||
int hash_rnd_recalc; | ||
struct tasklet_struct flush_tasklet; | ||
}; | ||
|
||
struct flow_cache { | ||
u32 hash_shift; | ||
struct flow_cache_percpu __percpu *percpu; | ||
struct notifier_block hotcpu_notifier; | ||
int low_watermark; | ||
int high_watermark; | ||
struct timer_list rnd_timer; | ||
}; | ||
#endif /* _NET_FLOWCACHE_H */ |
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.