1 /* Generated by ./xlat/gen.sh from ./xlat/ebpf_mode.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(BPF_IMM) || (defined(HAVE_DECL_BPF_IMM) && HAVE_DECL_BPF_IMM) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((BPF_IMM) == (0x00), "BPF_IMM != 0x00"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define BPF_IMM 0x00 12 #endif 13 #if defined(BPF_ABS) || (defined(HAVE_DECL_BPF_ABS) && HAVE_DECL_BPF_ABS) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((BPF_ABS) == (0x20), "BPF_ABS != 0x20"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define BPF_ABS 0x20 19 #endif 20 #if defined(BPF_IND) || (defined(HAVE_DECL_BPF_IND) && HAVE_DECL_BPF_IND) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((BPF_IND) == (0x40), "BPF_IND != 0x40"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define BPF_IND 0x40 26 #endif 27 #if defined(BPF_MEM) || (defined(HAVE_DECL_BPF_MEM) && HAVE_DECL_BPF_MEM) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((BPF_MEM) == (0x60), "BPF_MEM != 0x60"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define BPF_MEM 0x60 33 #endif 34 #if defined(BPF_XADD) || (defined(HAVE_DECL_BPF_XADD) && HAVE_DECL_BPF_XADD) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((BPF_XADD) == (0xc0), "BPF_XADD != 0xc0"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define BPF_XADD 0xc0 40 #endif 41 42 #ifndef XLAT_MACROS_ONLY 43 44 # ifdef IN_MPERS 45 46 # error static const struct xlat ebpf_mode in mpers mode 47 48 # else 49 50 static 51 const struct xlat ebpf_mode[] = { 52 XLAT(BPF_IMM), 53 XLAT(BPF_ABS), 54 XLAT(BPF_IND), 55 XLAT(BPF_MEM), 56 XLAT(BPF_XADD), 57 XLAT_END 58 }; 59 60 # endif /* !IN_MPERS */ 61 62 #endif /* !XLAT_MACROS_ONLY */ 63