All of lore.kernel.org
 help / color / mirror / Atom feed
* bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop'
@ 2025-07-31  2:21 Vincent Li
  2025-07-31  2:29 ` Tiezhu Yang
  2025-07-31  2:29 ` Chenghao Duan
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Li @ 2025-07-31  2:21 UTC (permalink / raw)
  To: Tiezhu Yang, Chenghao Duan, loongarch

Hi Tiezhu and Chenghao,

While attempting to test the bpf trampoline patches on loongarch on
top of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git,
 I ran into bpf selftest build error irrelevant to the bpf trampoline

  CLNG-BPF [test_progs] bpf_qdisc_fail__incompl_ops.bpf.o
progs/bpf_qdisc_fail__incompl_ops.c:13:2: error: call to undeclared
function 'bpf_qdisc_skb_drop'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
   13 |         bpf_qdisc_skb_drop(skb, to_free);
      |         ^

I am on Fedora 38 ( I should have updated to newer Fedora :)) with
clang version 18.1.0rc, not sure if it is related, wonder if you guys
have run into similar issues.

Vincent

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

* Re: bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop'
  2025-07-31  2:21 bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop' Vincent Li
@ 2025-07-31  2:29 ` Tiezhu Yang
  2025-07-31  2:59   ` Vincent Li
  2025-07-31  2:29 ` Chenghao Duan
  1 sibling, 1 reply; 5+ messages in thread
From: Tiezhu Yang @ 2025-07-31  2:29 UTC (permalink / raw)
  To: Vincent Li, Chenghao Duan, loongarch

On 2025/7/31 上午10:21, Vincent Li wrote:
> Hi Tiezhu and Chenghao,
> 
> While attempting to test the bpf trampoline patches on loongarch on
> top of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git,
>   I ran into bpf selftest build error irrelevant to the bpf trampoline
> 
>    CLNG-BPF [test_progs] bpf_qdisc_fail__incompl_ops.bpf.o
> progs/bpf_qdisc_fail__incompl_ops.c:13:2: error: call to undeclared
> function 'bpf_qdisc_skb_drop'; ISO C99 and later do not support
> implicit function declarations [-Wimplicit-function-declaration]
>     13 |         bpf_qdisc_skb_drop(skb, to_free);
>        |         ^

Please enable CONFIG_NET_SCH_BPF.

net/sched/bpf_qdisc.c
bpf_qdisc_skb_drop()

net/sched/Makefile
obj-$(CONFIG_NET_SCH_BPF)	+= bpf_qdisc.o

Thanks,
Tiezhu


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

* Re: bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop'
  2025-07-31  2:21 bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop' Vincent Li
  2025-07-31  2:29 ` Tiezhu Yang
@ 2025-07-31  2:29 ` Chenghao Duan
  2025-07-31  3:08   ` Vincent Li
  1 sibling, 1 reply; 5+ messages in thread
From: Chenghao Duan @ 2025-07-31  2:29 UTC (permalink / raw)
  To: Vincent Li; +Cc: Tiezhu Yang, loongarch

On Wed, Jul 30, 2025 at 07:21:52PM -0700, Vincent Li wrote:
> Hi Tiezhu and Chenghao,
> 
> While attempting to test the bpf trampoline patches on loongarch on
> top of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git,
>  I ran into bpf selftest build error irrelevant to the bpf trampoline
> 
>   CLNG-BPF [test_progs] bpf_qdisc_fail__incompl_ops.bpf.o
> progs/bpf_qdisc_fail__incompl_ops.c:13:2: error: call to undeclared
> function 'bpf_qdisc_skb_drop'; ISO C99 and later do not support
> implicit function declarations [-Wimplicit-function-declaration]
>    13 |         bpf_qdisc_skb_drop(skb, to_free);
>       |         ^
> 
> I am on Fedora 38 ( I should have updated to newer Fedora :)) with
> clang version 18.1.0rc, not sure if it is related, wonder if you guys
> have run into similar issues.
> 
> Vincent

Hi Vincent,

Yes, I have encountered a similar issue. My approach is to temporarily
block or comment out the test code that is unrelated to the trampoline
test.

Chenghao

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

* Re: bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop'
  2025-07-31  2:29 ` Tiezhu Yang
@ 2025-07-31  2:59   ` Vincent Li
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Li @ 2025-07-31  2:59 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Chenghao Duan, loongarch

On Wed, Jul 30, 2025 at 7:30 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> On 2025/7/31 上午10:21, Vincent Li wrote:
> > Hi Tiezhu and Chenghao,
> >
> > While attempting to test the bpf trampoline patches on loongarch on
> > top of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git,
> >   I ran into bpf selftest build error irrelevant to the bpf trampoline
> >
> >    CLNG-BPF [test_progs] bpf_qdisc_fail__incompl_ops.bpf.o
> > progs/bpf_qdisc_fail__incompl_ops.c:13:2: error: call to undeclared
> > function 'bpf_qdisc_skb_drop'; ISO C99 and later do not support
> > implicit function declarations [-Wimplicit-function-declaration]
> >     13 |         bpf_qdisc_skb_drop(skb, to_free);
> >        |         ^
>
> Please enable CONFIG_NET_SCH_BPF.
>

indeed I am missing it, will enable it, thanks a lot!

> net/sched/bpf_qdisc.c
> bpf_qdisc_skb_drop()
>
> net/sched/Makefile
> obj-$(CONFIG_NET_SCH_BPF)       += bpf_qdisc.o
>
> Thanks,
> Tiezhu
>
>

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

* Re: bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop'
  2025-07-31  2:29 ` Chenghao Duan
@ 2025-07-31  3:08   ` Vincent Li
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Li @ 2025-07-31  3:08 UTC (permalink / raw)
  To: Chenghao Duan; +Cc: Tiezhu Yang, loongarch

On Wed, Jul 30, 2025 at 7:30 PM Chenghao Duan <duanchenghao@kylinos.cn> wrote:
>
> On Wed, Jul 30, 2025 at 07:21:52PM -0700, Vincent Li wrote:
> > Hi Tiezhu and Chenghao,
> >
> > While attempting to test the bpf trampoline patches on loongarch on
> > top of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git,
> >  I ran into bpf selftest build error irrelevant to the bpf trampoline
> >
> >   CLNG-BPF [test_progs] bpf_qdisc_fail__incompl_ops.bpf.o
> > progs/bpf_qdisc_fail__incompl_ops.c:13:2: error: call to undeclared
> > function 'bpf_qdisc_skb_drop'; ISO C99 and later do not support
> > implicit function declarations [-Wimplicit-function-declaration]
> >    13 |         bpf_qdisc_skb_drop(skb, to_free);
> >       |         ^
> >
> > I am on Fedora 38 ( I should have updated to newer Fedora :)) with
> > clang version 18.1.0rc, not sure if it is related, wonder if you guys
> > have run into similar issues.
> >
> > Vincent
>
> Hi Vincent,
>
> Yes, I have encountered a similar issue. My approach is to temporarily
> block or comment out the test code that is unrelated to the trampoline
> test.
>
> Chenghao

good to know I am not the only one, actually I have looked at the
configs  below to check if I missed some kernel config, but somehow I
missed the CONFIG_NET_SCH_BPF. By the way, there is no
config.loongarch64 under tools/testing/selftests/bpf, is someone up
for adding bpf selftests for loongarch ? I thought about it, but it is
beyond my knowledge.

[root@fedora linux]# find tools/testing/selftests/bpf/ -name "config*"
tools/testing/selftests/bpf/config.riscv64
tools/testing/selftests/bpf/config.vm
tools/testing/selftests/bpf/config.x86_64
tools/testing/selftests/bpf/config
tools/testing/selftests/bpf/config.aarch64
tools/testing/selftests/bpf/config.s390x

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

end of thread, other threads:[~2025-07-31  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31  2:21 bpf selftest build error - undeclared function 'bpf_qdisc_skb_drop' Vincent Li
2025-07-31  2:29 ` Tiezhu Yang
2025-07-31  2:59   ` Vincent Li
2025-07-31  2:29 ` Chenghao Duan
2025-07-31  3:08   ` Vincent Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.