projects
/
flowspec-xdp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use BPF_F_NO_COMMON_LRU on BPF_MAP_TYPE_LRU_PERCPU_HASH maps
[flowspec-xdp]
/
xdp.c
diff --git
a/xdp.c
b/xdp.c
index 75a44ff2a16d0a22a3cd462107feeec7dd3997c1..87544ba80c16578cb548db9491fb5bc655dde178 100644
(file)
--- a/
xdp.c
+++ b/
xdp.c
@@
-204,6
+204,7
@@
struct percpu_ratelimit {
#define V6_SRC_RATE_DEFINE(n, limit) \
struct { \
__uint(type, BPF_MAP_TYPE_LRU_PERCPU_HASH); \
#define V6_SRC_RATE_DEFINE(n, limit) \
struct { \
__uint(type, BPF_MAP_TYPE_LRU_PERCPU_HASH); \
+ __uint(map_flags, BPF_F_NO_COMMON_LRU); \
__uint(max_entries, limit); \
uint128_t *key; \
struct percpu_ratelimit *value; \
__uint(max_entries, limit); \
uint128_t *key; \
struct percpu_ratelimit *value; \
@@
-212,6
+213,7
@@
struct { \
#define V4_SRC_RATE_DEFINE(n, limit) \
struct { \
__uint(type, BPF_MAP_TYPE_LRU_PERCPU_HASH); \
#define V4_SRC_RATE_DEFINE(n, limit) \
struct { \
__uint(type, BPF_MAP_TYPE_LRU_PERCPU_HASH); \
+ __uint(map_flags, BPF_F_NO_COMMON_LRU); \
__uint(max_entries, limit); \
__u32 *key; \
struct percpu_ratelimit *value; \
__uint(max_entries, limit); \
__u32 *key; \
struct percpu_ratelimit *value; \