BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
@ 2020-10-14  9:17 YueHaibing
  2020-10-15 16:37 ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: YueHaibing @ 2020-10-14  9:17 UTC (permalink / raw)
  To: davem, kuba, ast, daniel, kafai, songliubraving, yhs, andrii,
	john.fastabend, kpsingh, masahiroy
  Cc: netdev, bpf, linux-kernel, YueHaibing

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.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/bpfilter/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile
index cdac82b8c53a..389ea76ccc0b 100644
--- a/net/bpfilter/Makefile
+++ b/net/bpfilter/Makefile
@@ -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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-14  9:17 [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH YueHaibing
@ 2020-10-15 16:37 ` Jakub Kicinski
  2020-10-15 18:53   ` Alexei Starovoitov
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2020-10-15 16:37 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, ast, daniel, kafai, songliubraving, yhs, andrii,
	john.fastabend, kpsingh, masahiroy, netdev, bpf, linux-kernel

On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
> 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.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thank you!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 16:37 ` Jakub Kicinski
@ 2020-10-15 18:53   ` Alexei Starovoitov
  2020-10-15 18:56     ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Alexei Starovoitov @ 2020-10-15 18:53 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: YueHaibing, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML

On Thu, Oct 15, 2020 at 9:37 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
> > 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.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Applied, thank you!

Please revert. The patch makes no sense.
Also please don't take bpf patches.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 18:53   ` Alexei Starovoitov
@ 2020-10-15 18:56     ` Jakub Kicinski
  2020-10-15 19:03       ` Alexei Starovoitov
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2020-10-15 18:56 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: YueHaibing, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML

On Thu, 15 Oct 2020 11:53:08 -0700 Alexei Starovoitov wrote:
> On Thu, Oct 15, 2020 at 9:37 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:  
> > > 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.
> > >
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>  
> >
> > 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.

> Also please don't take bpf patches.

You had it marked it as netdev in your patchwork :/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 18:56     ` Jakub Kicinski
@ 2020-10-15 19:03       ` Alexei Starovoitov
  2020-10-15 19:26         ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Alexei Starovoitov @ 2020-10-15 19:03 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: YueHaibing, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML

On Thu, Oct 15, 2020 at 11:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 15 Oct 2020 11:53:08 -0700 Alexei Starovoitov wrote:
> > On Thu, Oct 15, 2020 at 9:37 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > > On Wed, 14 Oct 2020 17:17:49 +0800 YueHaibing wrote:
> > > > 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.
> > > >
> > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > >
> > > 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.

> > 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 19:03       ` Alexei Starovoitov
@ 2020-10-15 19:26         ` Jakub Kicinski
  2020-10-15 19:57           ` Alexei Starovoitov
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2020-10-15 19:26 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: YueHaibing, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML

On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
> On Thu, Oct 15, 2020 at 11:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > 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.

> > > 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 :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 19:26         ` Jakub Kicinski
@ 2020-10-15 19:57           ` Alexei Starovoitov
  2020-10-16  6:18             ` Yuehaibing
  0 siblings, 1 reply; 8+ messages in thread
From: Alexei Starovoitov @ 2020-10-15 19:57 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: YueHaibing, David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML

On Thu, Oct 15, 2020 at 12:26 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
> > On Thu, Oct 15, 2020 at 11:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > > 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.

> > > > 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH
  2020-10-15 19:57           ` Alexei Starovoitov
@ 2020-10-16  6:18             ` Yuehaibing
  0 siblings, 0 replies; 8+ messages in thread
From: Yuehaibing @ 2020-10-16  6:18 UTC (permalink / raw)
  To: Alexei Starovoitov, Jakub Kicinski
  Cc: David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Masahiro Yamada, Network Development,
	bpf, LKML



On 2020/10/16 3:57, Alexei Starovoitov wrote:
> On Thu, Oct 15, 2020 at 12:26 PM Jakub Kicinski <kuba@kernel.org> wrote:
>>
>> On Thu, 15 Oct 2020 12:03:14 -0700 Alexei Starovoitov wrote:
>>> On Thu, Oct 15, 2020 at 11:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>>>> 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'.

I didn't notice this, sorry for the wrong fix.

> 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.

Yes, this should rework.

> 
>>>>> 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.
> .
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14  9:17 [PATCH] bpfilter: Fix build error with CONFIG_BPFILTER_UMH YueHaibing
2020-10-15 16:37 ` Jakub Kicinski
2020-10-15 18:53   ` Alexei Starovoitov
2020-10-15 18:56     ` Jakub Kicinski
2020-10-15 19:03       ` Alexei Starovoitov
2020-10-15 19:26         ` Jakub Kicinski
2020-10-15 19:57           ` Alexei Starovoitov
2020-10-16  6:18             ` Yuehaibing

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git