History

bpf: Add BPF_MAP_TYPE_LRU_PERCPU_HASH

Provide a LRU version of the existing BPF_MAP_TYPE_PERCPU_HASH

Martin KaFai Lau committed 10 years ago

Commit 8f844931 parent 29ba7323 files · +131 −9Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/bpf.h+2−1
@@ -86,6 +86,7 @@ enum bpf_map_type { · 85 unmodified lines
86 BPF_MAP_TYPE_STACK_TRACE,86 BPF_MAP_TYPE_STACK_TRACE,
87 BPF_MAP_TYPE_CGROUP_ARRAY,87 BPF_MAP_TYPE_CGROUP_ARRAY,
88 BPF_MAP_TYPE_LRU_HASH,88 BPF_MAP_TYPE_LRU_HASH,
89 BPF_MAP_TYPE_LRU_PERCPU_HASH,
89};90};
90 91
91enum bpf_prog_type {92enum bpf_prog_type {
@@ -108,7 +109,7 @@ enum bpf_prog_type { · 16 unmodified lines
108 109
109#define BPF_F_NO_PREALLOC (1U << 0)110#define BPF_F_NO_PREALLOC (1U << 0)
110/* Instead of having one common LRU list in the111/* Instead of having one common LRU list in the
111 * BPF_MAP_TYPE_LRU_HASH map, use a percpu LRU list112 * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list
112 * which can scale and perform better.113 * which can scale and perform better.
113 * Note, the LRU nodes (including free nodes) cannot be moved114 * Note, the LRU nodes (including free nodes) cannot be moved
114 * across different LRU lists.115 * across different LRU lists.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t