diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2018-01-17 14:05:36 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-19 00:12:38 +0300 |
commit | cb5f7334d479414adc6afe60105283277e297489 (patch) | |
tree | 4f64b36c2ef1d8fa30c74a9bd262a247e33e14c9 /include/uapi/linux/bpf_common.h | |
parent | eefa864a81501161c05b35f14197677c937e5b9a (diff) | |
download | linux-cb5f7334d479414adc6afe60105283277e297489.tar.xz |
bpf: add comments to BPF ld/ldx sizes
Doc BPF ld/ldx size defines as comments in code, as it makes in
faster to lookup in a programming/review setting, than looking up
the sizes in Documentation/networking/filter.txt.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/uapi/linux/bpf_common.h')
-rw-r--r-- | include/uapi/linux/bpf_common.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/uapi/linux/bpf_common.h b/include/uapi/linux/bpf_common.h index 18be90725ab0..ee97668bdadb 100644 --- a/include/uapi/linux/bpf_common.h +++ b/include/uapi/linux/bpf_common.h @@ -15,9 +15,10 @@ /* ld/ldx fields */ #define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 -#define BPF_H 0x08 -#define BPF_B 0x10 +#define BPF_W 0x00 /* 32-bit */ +#define BPF_H 0x08 /* 16-bit */ +#define BPF_B 0x10 /* 8-bit */ +/* eBPF BPF_DW 0x18 64-bit */ #define BPF_MODE(code) ((code) & 0xe0) #define BPF_IMM 0x00 #define BPF_ABS 0x20 |