bpf_map_def: undo incorrect comment change.
This is a *partial* NOOP revert of:
'bpf: support BPF_F_NO_PREALLOC in bpf_map_def.h'
https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3457780
The comment is simply wrong, the negativeness is hidden
by the map declaration macros and thus never makes it
into the max_entries field of bpf_map_def struct.
A negative value passed to the map creation macros will store
the absolute value in max_entries, and set the BPF_F_NO_PREALLOC
flag in map_flags.
A negative / excessively large max_entries field will (presumably)
fail during map creation due to lack of ram.
Bug: 399549732
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I86951605cb1397c512c484c84e9d67a85b992b07
diff --git a/bpf/headers/include/bpf_map_def.h b/bpf/headers/include/bpf_map_def.h
index e95ca5f..2e5afca 100644
--- a/bpf/headers/include/bpf_map_def.h
+++ b/bpf/headers/include/bpf_map_def.h
@@ -163,7 +163,7 @@
enum bpf_map_type type;
unsigned int key_size;
unsigned int value_size;
- int max_entries; // negative means BPF_F_NO_PREALLOC, but *might* not work with S
+ unsigned int max_entries;
unsigned int map_flags;
// The following are not supported by the Android bpfloader: