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

2021-03-17 Thread Alexei Starovoitov
On Wed, Mar 17, 2021 at 5:52 AM Jianlin Lv wrote: > 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 @@ > #defi

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

2021-03-17 Thread Jianlin Lv
Added BPF_SIZE_MASK macro as mask of size modifier that help to reduce the evaluation of expressions in if statements, and remove BPF_SIZE_MASK in netronome driver. Signed-off-by: Jianlin Lv --- drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 -- include/uapi/linux/bpf.h