1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI__LINUX_BPF_COMMON_H__
3 #define _UAPI__LINUX_BPF_COMMON_H__
5 /* Instruction classes */
6 #define BPF_CLASS(code) ((code) & 0x07)
17 #define BPF_SIZE(code) ((code) & 0x18)
18 #define BPF_W 0x00 /* 32-bit */
19 #define BPF_H 0x08 /* 16-bit */
20 #define BPF_B 0x10 /* 8-bit */
21 /* eBPF BPF_DW 0x18 64-bit */
22 #define BPF_MODE(code) ((code) & 0xe0)
31 #define BPF_OP(code) ((code) & 0xf0)
49 #define BPF_SRC(code) ((code) & 0x08)
54 #define BPF_MAXINSNS 4096
57 #endif /* _UAPI__LINUX_BPF_COMMON_H__ */