Re: [PATCH bpf-next] bpf: Simplify expression for identify bpf mem type

From
Alexei Starovoitov <hidden>
Date
2021-03-17 19:52:28
Also in
bpf, linux-api, lkml
Reply to
Jianlin Lv, 2021-03-17
On Wed, Mar 17, 2021 at 5:52 AM Jianlin Lv [off-list ref] wrote:
quoted hunk ↗ jump to hunk
        return BPF_CLASS(meta->insn.code);
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 2d3036e292a9..5d77675e7112 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -21,6 +21,7 @@
 #define BPF_DW         0x18    /* double word (64-bit) */
 #define BPF_ATOMIC     0xc0    /* atomic memory ops - op type in immediate */
 #define BPF_XADD       0xc0    /* exclusive add - legacy name */
+#define BPF_SIZE_MASK  0x18    /* mask of size modifier */
Pls don't add kernel internal defines to uapi.
Thread (2 messages) 2 messages, 2 authors, last reply 2021-03-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help