Skip to content
Snippets Groups Projects
Commit 5e558f9a authored by Martynas Pumputis's avatar Martynas Pumputis Committed by Greg Kroah-Hartman
Browse files

bpf: simplify definition of BPF_FIB_LOOKUP related flags


commit b1d6c15b upstream.

Previously, the BPF_FIB_LOOKUP_{DIRECT,OUTPUT} flags in the BPF UAPI
were defined with the help of BIT macro. This had the following issues:

- In order to use any of the flags, a user was required to depend
  on <linux/bits.h>.
- No other flag in bpf.h uses the macro, so it seems that an unwritten
  convention is to use (1 << (nr)) to define BPF-related flags.

Fixes: 87f5fc7e ("bpf: Provide helper to do forwarding lookups in kernel FIB table")
Signed-off-by: default avatarMartynas Pumputis <m@lambda.lt>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d2c0ec2
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment