diff options
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r-- | include/uapi/linux/bpf.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 5ecbe812a2cc..843818dff96d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -165,6 +165,7 @@ enum bpf_attach_type { | |||
165 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ | 165 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ |
166 | #define BPF_EXIST 2 /* update existing element */ | 166 | #define BPF_EXIST 2 /* update existing element */ |
167 | 167 | ||
168 | /* flags for BPF_MAP_CREATE command */ | ||
168 | #define BPF_F_NO_PREALLOC (1U << 0) | 169 | #define BPF_F_NO_PREALLOC (1U << 0) |
169 | /* Instead of having one common LRU list in the | 170 | /* Instead of having one common LRU list in the |
170 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list | 171 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list |
@@ -173,6 +174,8 @@ enum bpf_attach_type { | |||
173 | * across different LRU lists. | 174 | * across different LRU lists. |
174 | */ | 175 | */ |
175 | #define BPF_F_NO_COMMON_LRU (1U << 1) | 176 | #define BPF_F_NO_COMMON_LRU (1U << 1) |
177 | /* Specify numa node during map creation */ | ||
178 | #define BPF_F_NUMA_NODE (1U << 2) | ||
176 | 179 | ||
177 | union bpf_attr { | 180 | union bpf_attr { |
178 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 181 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
@@ -180,8 +183,13 @@ union bpf_attr { | |||
180 | __u32 key_size; /* size of key in bytes */ | 183 | __u32 key_size; /* size of key in bytes */ |
181 | __u32 value_size; /* size of value in bytes */ | 184 | __u32 value_size; /* size of value in bytes */ |
182 | __u32 max_entries; /* max number of entries in a map */ | 185 | __u32 max_entries; /* max number of entries in a map */ |
183 | __u32 map_flags; /* prealloc or not */ | 186 | __u32 map_flags; /* BPF_MAP_CREATE related |
187 | * flags defined above. | ||
188 | */ | ||
184 | __u32 inner_map_fd; /* fd pointing to the inner map */ | 189 | __u32 inner_map_fd; /* fd pointing to the inner map */ |
190 | __u32 numa_node; /* numa node (effective only if | ||
191 | * BPF_F_NUMA_NODE is set). | ||
192 | */ | ||
185 | }; | 193 | }; |
186 | 194 | ||
187 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 195 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |