From 1fde2247b74f70a7585fe3f5ffe432d6522100b7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 25 May 2021 03:07:17 +0000 Subject: [PATCH] Use BPF_F_NO_COMMON_LRU on BPF_MAP_TYPE_LRU_PERCPU_HASH maps --- xdp.c | 2 ++ 1 file changed, 2 insertions(+) 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; \ -- 2.39.5