summaryrefslogtreecommitdiffstats
path: root/Documentation/bpf
diff options
context:
space:
mode:
authorJoe Stringer <joe@isovalent.com>2023-04-22 19:20:53 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2023-04-27 14:20:29 +0200
commitaf0335d2926e1c597c247956cd608b6e8c9d6463 (patch)
tree902b1fb1d7bf742946da1a72fa2d59955a8f7235 /Documentation/bpf
parentselftests/bpf: Add test case to assert precise scalar path pruning (diff)
downloadlinux-af0335d2926e1c597c247956cd608b6e8c9d6463.tar.xz
linux-af0335d2926e1c597c247956cd608b6e8c9d6463.zip
docs/bpf: Add table to describe LRU properties
Depending on the map type and flags for LRU, different properties are global or percpu. Add a table to describe these. Signed-off-by: Joe Stringer <joe@isovalent.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20230422172054.3355436-1-joe@isovalent.com
Diffstat (limited to 'Documentation/bpf')
-rw-r--r--Documentation/bpf/map_hash.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/bpf/map_hash.rst b/Documentation/bpf/map_hash.rst
index 8669426264c6..1314dfc5e7e1 100644
--- a/Documentation/bpf/map_hash.rst
+++ b/Documentation/bpf/map_hash.rst
@@ -29,7 +29,16 @@ will automatically evict the least recently used entries when the hash
table reaches capacity. An LRU hash maintains an internal LRU list that
is used to select elements for eviction. This internal LRU list is
shared across CPUs but it is possible to request a per CPU LRU list with
-the ``BPF_F_NO_COMMON_LRU`` flag when calling ``bpf_map_create``.
+the ``BPF_F_NO_COMMON_LRU`` flag when calling ``bpf_map_create``. The
+following table outlines the properties of LRU maps depending on the a
+map type and the flags used to create the map.
+
+======================== ========================= ================================
+Flag ``BPF_MAP_TYPE_LRU_HASH`` ``BPF_MAP_TYPE_LRU_PERCPU_HASH``
+======================== ========================= ================================
+**BPF_F_NO_COMMON_LRU** Per-CPU LRU, global map Per-CPU LRU, per-cpu map
+**!BPF_F_NO_COMMON_LRU** Global LRU, global map Global LRU, per-cpu map
+======================== ========================= ================================
Usage
=====