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