bpfilter: Fix build error with CONFIG_BPFILTER_UMH
Subsystems (3)
PATCH 1/1 bpfilter: Fix build error with CONFIG_BPFILTER_UMH
IF CONFIG_BPFILTER_UMH is set, building fails:
In file included from /usr/include/sys/socket.h:33:0,
from net/bpfilter/main.c:6:/usr/include/bits/socket.h:390:10: fatal error: asm/socket.h: No such file or directory
#include <asm/socket.h>
^~~~~~~~~~~~~~compilation terminated.scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1
Add missing include path to fix this.
--- net/bpfilter/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bpfilter/Makefile +1 -1
@@ -5,7 +5,7 @@ userprogs := bpfilter_umh bpfilter_umh-objs := main.o -userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi +userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi -I usr/include/ ifeq ($(CONFIG_BPFILTER_UMH), y) # builtin bpfilter_umh should be linked with -static
Signature · 1 line
2.17.1
Quoted 7 lines · On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
IF
CONFIG_BPFILTER_UMHis set, building fails:In file included from
/usr/include/sys/socket.h:33:0,
fromnet/bpfilter/main.c:6:/usr/include/bits/socket.h:390:10: fatal error:asm/socket.h: No such file or directory#include <asm/socket.h> ^~~~~~~~~~~~~~
Quoted 7 lines
compilation terminated.
scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1Add missing include path to fix this.
Signed-off-by YueHaibing <[email protected]>
Applied, thank you!
Quoted 13 lines · Jakub Kicinski
Quoted 11 lines · On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
IF
CONFIG_BPFILTER_UMHis set, building fails:In file included from
/usr/include/sys/socket.h:33:0,
fromnet/bpfilter/main.c:6:/usr/include/bits/socket.h:390:10: fatal error:asm/socket.h: No such file or directory#include <asm/socket.h> ^~~~~~~~~~~~~~compilation terminated.
scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1
Quoted 5 lines
Quoted 3 lines
Add missing include path to fix this.
Signed-off-by YueHaibing <[email protected]>Applied, thank you!
Please revert. The patch makes no sense.
Also please don't take bpf patches.
Jakub Kicinski
maintainerQuoted 13 lines · On Thu, 15 Oct 2020 11:53:08 -0700 Alexei Starovoitov wrote:
Quoted 12 lines · Jakub Kicinski
Quoted 11 lines · On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
IF
CONFIG_BPFILTER_UMHis set, building fails:In file included from
/usr/include/sys/socket.h:33:0,
fromnet/bpfilter/main.c:6:/usr/include/bits/socket.h:390:10: fatal error:asm/socket.h: No such file or directory#include <asm/socket.h> ^~~~~~~~~~~~~~compilation terminated.
scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Add missing include path to fix this.
Signed-off-by YueHaibing <[email protected]>Applied, thank you!
Please revert. The patch makes no sense.
How so? It's using in-tree headers instead of system ones. Many samples seem to be doing the same thing.
Quoted 1 line
Also please don't take bpf patches.
You had it marked it as netdev in your patchwork :/
Quoted 17 lines · Jakub Kicinski
Quoted 15 lines · On Thu, 15 Oct 2020 11:53:08 -0700 Alexei Starovoitov wrote:
Quoted 14 lines · Jakub Kicinski
Quoted 13 lines · On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
IF
CONFIG_BPFILTER_UMHis set, building fails:In file included from
/usr/include/sys/socket.h:33:0,
fromnet/bpfilter/main.c:6:/usr/include/bits/socket.h:390:10: fatal error:asm/socket.h: No such file or directory#include <asm/socket.h> ^~~~~~~~~~~~~~compilation terminated.
scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1Add missing include path to fix this.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by YueHaibing <[email protected]>Applied, thank you!
Please revert. The patch makes no sense.
How so? It's using in-tree headers instead of system ones. Many samples seem to be doing the same thing.
There is no such thing as "usr/include" in the kernel build and source trees.
Quoted 3 lines
Quoted 1 line
Also please don't take bpf patches.
You had it marked it as netdev in your patchwork :/
It was delegated automatically by the patchwork system. I didn't have time to reassign, but you should have known better when you saw 'bpfilter' in the subject.
Jakub Kicinski
maintainerQuoted 5 lines · On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
Quoted 2 lines · Jakub Kicinski
How so? It's using in-tree headers instead of system ones. Many samples seem to be doing the same thing.
There is no such thing as "usr/include" in the kernel build and source trees.
Hm. I thought bpfilter somehow depends on make headers. But it doesn't seem to. Reverting now.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Also please don't take bpf patches.
You had it marked it as netdev in your patchwork :/
It was delegated automatically by the patchwork system. I didn't have time to reassign, but you should have known better when you saw 'bpfilter' in the subject.
The previous committers for bpfilter are almost all Dave, so I checked your patchwork to make sure and it was netdev...
I'll do better next time :)
Quoted 10 lines · Jakub Kicinski
Quoted 5 lines · On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
Quoted 2 lines · Jakub Kicinski
How so? It's using in-tree headers instead of system ones. Many samples seem to be doing the same thing.
There is no such thing as "usr/include" in the kernel build and source trees.
Hm. I thought bpfilter somehow depends on make headers. But it doesn't seem to. Reverting now.
Thanks!
Right. To explain it a bit further for the author of the patch:
Some samples makefiles use this -I usr/include pattern. That's different. This local "usr/include" is a result of 'make headers_install'.
For samples and such it's ok to depend on that, but bpfilter is the part of the kernel build.
It cannot depend on the 'make headers_install' step, so the fix has to be different.
Quoted 10 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Also please don't take bpf patches.
You had it marked it as netdev in your patchwork :/
It was delegated automatically by the patchwork system. I didn't have time to reassign, but you should have known better when you saw 'bpfilter' in the subject.
The previous committers for bpfilter are almost all Dave, so I checked your patchwork to make sure and it was netdev...
It was my fault. I was sloppy in the past and didn't pay enough attention to bpfilter and it started to bitrot because Dave was applying patches with his normal SLAs while I was silent.
Quoted 9 lines · Alexei Starovoitov
Quoted 8 lines · Jakub Kicinski
Quoted 5 lines · On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
Quoted 2 lines · Jakub Kicinski
How so? It's using in-tree headers instead of system ones. Many samples seem to be doing the same thing.
There is no such thing as "usr/include" in the kernel build and source trees.
Quoted 8 lines
Quoted 2 lines
Hm. I thought bpfilter somehow depends on make headers. But it doesn't seem to. Reverting now.
Thanks!
Right. To explain it a bit further for the author of the patch:
Some samples makefiles use this -I usr/include pattern. That's different. This local "usr/include" is a result of 'makeheaders_install'.
I didn't notice this, sorry for the wrong fix.
Quoted 4 lines
For samples and such it's ok to depend on that, but bpfilter is the part of the kernel build.
It cannot depend on the 'makeheaders_install' step, so the fix has to be different.
Yes, this should rework.
Quoted 17 lines
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Also please don't take bpf patches.
You had it marked it as netdev in your patchwork :/
It was delegated automatically by the patchwork system. I didn't have time to reassign, but you should have known better when you saw 'bpfilter' in the subject.
The previous committers for bpfilter are almost all Dave, so I checked your patchwork to make sure and it was netdev...
It was my fault. I was sloppy in the past and didn't pay enough attention to bpfilter and it started to bitrot because Dave was applying patches with his normal SLAs while I was silent.
.