From: Matt Corallo Date: Tue, 25 May 2021 03:07:17 +0000 (+0000) Subject: Use BPF_F_NO_COMMON_LRU on BPF_MAP_TYPE_LRU_PERCPU_HASH maps X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1fde2247b74f70a7585fe3f5ffe432d6522100b7;p=flowspec-xdp Use BPF_F_NO_COMMON_LRU on BPF_MAP_TYPE_LRU_PERCPU_HASH maps --- diff --git a/xdp.c b/xdp.c index 75a44ff..87544ba 100644 --- 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); \ + __uint(map_flags, BPF_F_NO_COMMON_LRU); \ __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); \ + __uint(map_flags, BPF_F_NO_COMMON_LRU); \ __uint(max_entries, limit); \ __u32 *key; \ struct percpu_ratelimit *value; \