1 /* Generated by ./xlat/gen.sh from ./xlat/bpf_map_flags.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(BPF_F_NO_PREALLOC) || (defined(HAVE_DECL_BPF_F_NO_PREALLOC) && HAVE_DECL_BPF_F_NO_PREALLOC)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((BPF_F_NO_PREALLOC) == (1), "BPF_F_NO_PREALLOC != 1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define BPF_F_NO_PREALLOC 1
12 #endif
13 #if defined(BPF_F_NO_COMMON_LRU) || (defined(HAVE_DECL_BPF_F_NO_COMMON_LRU) && HAVE_DECL_BPF_F_NO_COMMON_LRU)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((BPF_F_NO_COMMON_LRU) == (2), "BPF_F_NO_COMMON_LRU != 2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define BPF_F_NO_COMMON_LRU 2
19 #endif
20 #if defined(BPF_F_NUMA_NODE) || (defined(HAVE_DECL_BPF_F_NUMA_NODE) && HAVE_DECL_BPF_F_NUMA_NODE)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((BPF_F_NUMA_NODE) == (4), "BPF_F_NUMA_NODE != 4");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define BPF_F_NUMA_NODE 4
26 #endif
27 #if defined(BPF_F_RDONLY) || (defined(HAVE_DECL_BPF_F_RDONLY) && HAVE_DECL_BPF_F_RDONLY)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((BPF_F_RDONLY) == ((1U << 3)), "BPF_F_RDONLY != (1U << 3)");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define BPF_F_RDONLY (1U << 3)
33 #endif
34 #if defined(BPF_F_WRONLY) || (defined(HAVE_DECL_BPF_F_WRONLY) && HAVE_DECL_BPF_F_WRONLY)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((BPF_F_WRONLY) == ((1U << 4)), "BPF_F_WRONLY != (1U << 4)");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define BPF_F_WRONLY (1U << 4)
40 #endif
41 #if defined(BPF_F_STACK_BUILD_ID) || (defined(HAVE_DECL_BPF_F_STACK_BUILD_ID) && HAVE_DECL_BPF_F_STACK_BUILD_ID)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((BPF_F_STACK_BUILD_ID) == ((1U << 5)), "BPF_F_STACK_BUILD_ID != (1U << 5)");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define BPF_F_STACK_BUILD_ID (1U << 5)
47 #endif
48 
49 #ifndef XLAT_MACROS_ONLY
50 
51 # ifdef IN_MPERS
52 
53 #  error static const struct xlat bpf_map_flags in mpers mode
54 
55 # else
56 
57 static
58 const struct xlat bpf_map_flags[] = {
59  XLAT(BPF_F_NO_PREALLOC),
60  XLAT(BPF_F_NO_COMMON_LRU),
61  XLAT(BPF_F_NUMA_NODE),
62  XLAT(BPF_F_RDONLY),
63  XLAT(BPF_F_WRONLY),
64  XLAT(BPF_F_STACK_BUILD_ID),
65  XLAT_END
66 };
67 
68 # endif /* !IN_MPERS */
69 
70 #endif /* !XLAT_MACROS_ONLY */
71