Skip to contentSkip to conversation

net: filter: move common defines into bpf_common.h

PATCH Applied Alexei Starovoitov 2 participants 2 messages Oct 14, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: filter: move common defines into bpf_common.h

userspace programs that use eBPF instruction macros need to include two files:
uapi/linux/filter.h and uapi/linux/bpf.h
Move common macro definitions that are shared between classic BPF and eBPF into uapi/linux/bpf_common.h, so that user app can include only one bpf.h file

---

Daniel believes that this patch has to be done for this merge window. I think it can wait till next, but it won't hurt now either.

 include/uapi/linux/Kbuild       |    1 +
 include/uapi/linux/bpf.h        |    1 +
 include/uapi/linux/bpf_common.h |   55 ++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/filter.h     |   56 +--------------------------------------
 4 files changed, 58 insertions(+), 55 deletions(-)
 create mode 100644 include/uapi/linux/bpf_common.h
include/uapi/linux/Kbuild +1 -0
index 70e150e..1115d68 100644
@@ -68,6 +68,7 @@ header-y += binfmts.h
 header-y += blkpg.h
 header-y += blktrace_api.h
 header-y += bpf.h
+header-y += bpf_common.h
 header-y += bpqether.h
 header-y += bsg.h
 header-y += btrfs.h
include/uapi/linux/bpf.h +1 -0
index 31b0ac2..d18316f 100644
@@ -8,6 +8,7 @@
 #define _UAPI__LINUX_BPF_H__
 
 #include <linux/types.h>
+#include <linux/bpf_common.h>
 
 /* Extended instruction set based on top of classic BPF */
 
include/uapi/linux/bpf_common.h new file +55 -0

55 lines not on this page · raw message

include/uapi/linux/filter.h +1 -55

74 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/[email protected]>
Date: Tue, 14 Oct 2014 02:08:54 -0700

Quoted 11 lines

userspace programs that use eBPF instruction macros need to include two files:
uapi/linux/filter.h and uapi/linux/bpf.h
Move common macro definitions that are shared between classic BPF and eBPF into uapi/linux/bpf_common.h, so that user app can include only one bpf.h file

---

Daniel believes that this patch has to be done for this merge window. I think it can wait till next, but it won't hurt now either.

Applied, thanks everyone.