1 /* Generated by ./xlat/gen.sh from ./xlat/bpf_commands.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(BPF_MAP_CREATE) || (defined(HAVE_DECL_BPF_MAP_CREATE) && HAVE_DECL_BPF_MAP_CREATE) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((BPF_MAP_CREATE) == (0), "BPF_MAP_CREATE != 0"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define BPF_MAP_CREATE 0 12 #endif 13 #if defined(BPF_MAP_LOOKUP_ELEM) || (defined(HAVE_DECL_BPF_MAP_LOOKUP_ELEM) && HAVE_DECL_BPF_MAP_LOOKUP_ELEM) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((BPF_MAP_LOOKUP_ELEM) == (1), "BPF_MAP_LOOKUP_ELEM != 1"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define BPF_MAP_LOOKUP_ELEM 1 19 #endif 20 #if defined(BPF_MAP_UPDATE_ELEM) || (defined(HAVE_DECL_BPF_MAP_UPDATE_ELEM) && HAVE_DECL_BPF_MAP_UPDATE_ELEM) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((BPF_MAP_UPDATE_ELEM) == (2), "BPF_MAP_UPDATE_ELEM != 2"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define BPF_MAP_UPDATE_ELEM 2 26 #endif 27 #if defined(BPF_MAP_DELETE_ELEM) || (defined(HAVE_DECL_BPF_MAP_DELETE_ELEM) && HAVE_DECL_BPF_MAP_DELETE_ELEM) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((BPF_MAP_DELETE_ELEM) == (3), "BPF_MAP_DELETE_ELEM != 3"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define BPF_MAP_DELETE_ELEM 3 33 #endif 34 #if defined(BPF_MAP_GET_NEXT_KEY) || (defined(HAVE_DECL_BPF_MAP_GET_NEXT_KEY) && HAVE_DECL_BPF_MAP_GET_NEXT_KEY) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((BPF_MAP_GET_NEXT_KEY) == (4), "BPF_MAP_GET_NEXT_KEY != 4"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define BPF_MAP_GET_NEXT_KEY 4 40 #endif 41 #if defined(BPF_PROG_LOAD) || (defined(HAVE_DECL_BPF_PROG_LOAD) && HAVE_DECL_BPF_PROG_LOAD) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((BPF_PROG_LOAD) == (5), "BPF_PROG_LOAD != 5"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define BPF_PROG_LOAD 5 47 #endif 48 #if defined(BPF_OBJ_PIN) || (defined(HAVE_DECL_BPF_OBJ_PIN) && HAVE_DECL_BPF_OBJ_PIN) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((BPF_OBJ_PIN) == (6), "BPF_OBJ_PIN != 6"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define BPF_OBJ_PIN 6 54 #endif 55 #if defined(BPF_OBJ_GET) || (defined(HAVE_DECL_BPF_OBJ_GET) && HAVE_DECL_BPF_OBJ_GET) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((BPF_OBJ_GET) == (7), "BPF_OBJ_GET != 7"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define BPF_OBJ_GET 7 61 #endif 62 #if defined(BPF_PROG_ATTACH) || (defined(HAVE_DECL_BPF_PROG_ATTACH) && HAVE_DECL_BPF_PROG_ATTACH) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((BPF_PROG_ATTACH) == (8), "BPF_PROG_ATTACH != 8"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define BPF_PROG_ATTACH 8 68 #endif 69 #if defined(BPF_PROG_DETACH) || (defined(HAVE_DECL_BPF_PROG_DETACH) && HAVE_DECL_BPF_PROG_DETACH) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((BPF_PROG_DETACH) == (9), "BPF_PROG_DETACH != 9"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define BPF_PROG_DETACH 9 75 #endif 76 #if defined(BPF_PROG_TEST_RUN) || (defined(HAVE_DECL_BPF_PROG_TEST_RUN) && HAVE_DECL_BPF_PROG_TEST_RUN) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((BPF_PROG_TEST_RUN) == (10), "BPF_PROG_TEST_RUN != 10"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define BPF_PROG_TEST_RUN 10 82 #endif 83 #if defined(BPF_PROG_GET_NEXT_ID) || (defined(HAVE_DECL_BPF_PROG_GET_NEXT_ID) && HAVE_DECL_BPF_PROG_GET_NEXT_ID) 84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 85 static_assert((BPF_PROG_GET_NEXT_ID) == (11), "BPF_PROG_GET_NEXT_ID != 11"); 86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 87 #else 88 # define BPF_PROG_GET_NEXT_ID 11 89 #endif 90 #if defined(BPF_MAP_GET_NEXT_ID) || (defined(HAVE_DECL_BPF_MAP_GET_NEXT_ID) && HAVE_DECL_BPF_MAP_GET_NEXT_ID) 91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 92 static_assert((BPF_MAP_GET_NEXT_ID) == (12), "BPF_MAP_GET_NEXT_ID != 12"); 93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 94 #else 95 # define BPF_MAP_GET_NEXT_ID 12 96 #endif 97 #if defined(BPF_PROG_GET_FD_BY_ID) || (defined(HAVE_DECL_BPF_PROG_GET_FD_BY_ID) && HAVE_DECL_BPF_PROG_GET_FD_BY_ID) 98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 99 static_assert((BPF_PROG_GET_FD_BY_ID) == (13), "BPF_PROG_GET_FD_BY_ID != 13"); 100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 101 #else 102 # define BPF_PROG_GET_FD_BY_ID 13 103 #endif 104 #if defined(BPF_MAP_GET_FD_BY_ID) || (defined(HAVE_DECL_BPF_MAP_GET_FD_BY_ID) && HAVE_DECL_BPF_MAP_GET_FD_BY_ID) 105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 106 static_assert((BPF_MAP_GET_FD_BY_ID) == (14), "BPF_MAP_GET_FD_BY_ID != 14"); 107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 108 #else 109 # define BPF_MAP_GET_FD_BY_ID 14 110 #endif 111 #if defined(BPF_OBJ_GET_INFO_BY_FD) || (defined(HAVE_DECL_BPF_OBJ_GET_INFO_BY_FD) && HAVE_DECL_BPF_OBJ_GET_INFO_BY_FD) 112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 113 static_assert((BPF_OBJ_GET_INFO_BY_FD) == (15), "BPF_OBJ_GET_INFO_BY_FD != 15"); 114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 115 #else 116 # define BPF_OBJ_GET_INFO_BY_FD 15 117 #endif 118 #if defined(BPF_PROG_QUERY) || (defined(HAVE_DECL_BPF_PROG_QUERY) && HAVE_DECL_BPF_PROG_QUERY) 119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 120 static_assert((BPF_PROG_QUERY) == (16), "BPF_PROG_QUERY != 16"); 121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 122 #else 123 # define BPF_PROG_QUERY 16 124 #endif 125 #if defined(BPF_RAW_TRACEPOINT_OPEN) || (defined(HAVE_DECL_BPF_RAW_TRACEPOINT_OPEN) && HAVE_DECL_BPF_RAW_TRACEPOINT_OPEN) 126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 127 static_assert((BPF_RAW_TRACEPOINT_OPEN) == (17), "BPF_RAW_TRACEPOINT_OPEN != 17"); 128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 129 #else 130 # define BPF_RAW_TRACEPOINT_OPEN 17 131 #endif 132 #if defined(BPF_BTF_LOAD) || (defined(HAVE_DECL_BPF_BTF_LOAD) && HAVE_DECL_BPF_BTF_LOAD) 133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 134 static_assert((BPF_BTF_LOAD) == (18), "BPF_BTF_LOAD != 18"); 135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 136 #else 137 # define BPF_BTF_LOAD 18 138 #endif 139 #if defined(BPF_BTF_GET_FD_BY_ID) || (defined(HAVE_DECL_BPF_BTF_GET_FD_BY_ID) && HAVE_DECL_BPF_BTF_GET_FD_BY_ID) 140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 141 static_assert((BPF_BTF_GET_FD_BY_ID) == (19), "BPF_BTF_GET_FD_BY_ID != 19"); 142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 143 #else 144 # define BPF_BTF_GET_FD_BY_ID 19 145 #endif 146 #if defined(BPF_TASK_FD_QUERY) || (defined(HAVE_DECL_BPF_TASK_FD_QUERY) && HAVE_DECL_BPF_TASK_FD_QUERY) 147 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 148 static_assert((BPF_TASK_FD_QUERY) == (20), "BPF_TASK_FD_QUERY != 20"); 149 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 150 #else 151 # define BPF_TASK_FD_QUERY 20 152 #endif 153 154 #ifndef XLAT_MACROS_ONLY 155 156 # ifdef IN_MPERS 157 158 # error static const struct xlat bpf_commands in mpers mode 159 160 # else 161 162 static 163 const struct xlat bpf_commands[] = { 164 [BPF_MAP_CREATE] = XLAT(BPF_MAP_CREATE), 165 [BPF_MAP_LOOKUP_ELEM] = XLAT(BPF_MAP_LOOKUP_ELEM), 166 [BPF_MAP_UPDATE_ELEM] = XLAT(BPF_MAP_UPDATE_ELEM), 167 [BPF_MAP_DELETE_ELEM] = XLAT(BPF_MAP_DELETE_ELEM), 168 [BPF_MAP_GET_NEXT_KEY] = XLAT(BPF_MAP_GET_NEXT_KEY), 169 [BPF_PROG_LOAD] = XLAT(BPF_PROG_LOAD), 170 [BPF_OBJ_PIN] = XLAT(BPF_OBJ_PIN), 171 [BPF_OBJ_GET] = XLAT(BPF_OBJ_GET), 172 [BPF_PROG_ATTACH] = XLAT(BPF_PROG_ATTACH), 173 [BPF_PROG_DETACH] = XLAT(BPF_PROG_DETACH), 174 [BPF_PROG_TEST_RUN] = XLAT(BPF_PROG_TEST_RUN), 175 [BPF_PROG_GET_NEXT_ID] = XLAT(BPF_PROG_GET_NEXT_ID), 176 [BPF_MAP_GET_NEXT_ID] = XLAT(BPF_MAP_GET_NEXT_ID), 177 [BPF_PROG_GET_FD_BY_ID] = XLAT(BPF_PROG_GET_FD_BY_ID), 178 [BPF_MAP_GET_FD_BY_ID] = XLAT(BPF_MAP_GET_FD_BY_ID), 179 [BPF_OBJ_GET_INFO_BY_FD] = XLAT(BPF_OBJ_GET_INFO_BY_FD), 180 [BPF_PROG_QUERY] = XLAT(BPF_PROG_QUERY), 181 [BPF_RAW_TRACEPOINT_OPEN] = XLAT(BPF_RAW_TRACEPOINT_OPEN), 182 [BPF_BTF_LOAD] = XLAT(BPF_BTF_LOAD), 183 [BPF_BTF_GET_FD_BY_ID] = XLAT(BPF_BTF_GET_FD_BY_ID), 184 [BPF_TASK_FD_QUERY] = XLAT(BPF_TASK_FD_QUERY), 185 XLAT_END 186 }; 187 188 # endif /* !IN_MPERS */ 189 190 #endif /* !XLAT_MACROS_ONLY */ 191