* bpf selftest tc_bpf failed with latest bpf-next
@ 2021-07-18 19:29 Yonghong Song
2021-07-19 4:11 ` yajun.deng
0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Song @ 2021-07-18 19:29 UTC (permalink / raw)
To: bpf, yajun.deng, Kumar Kartikeya Dwivedi
The bpf selftest tc_bpf failed with latest bpf-next. The following is
the command to run and the result:
$ ./test_progs -n 132
[ 40.947571] bpf_testmod: loading out-of-tree module taints kernel.
test_tc_bpf:PASS:test_tc_bpf__open_and_load 0 nsec
test_tc_bpf:PASS:bpf_tc_hook_create(BPF_TC_INGRESS) 0 nsec
test_tc_bpf:PASS:bpf_tc_hook_create invalid hook.attach_point 0 nsec
test_tc_bpf_basic:PASS:bpf_obj_get_info_by_fd 0 nsec
test_tc_bpf_basic:PASS:bpf_tc_attach 0 nsec
test_tc_bpf_basic:PASS:handle set 0 nsec
test_tc_bpf_basic:PASS:priority set 0 nsec
test_tc_bpf_basic:PASS:prog_id set 0 nsec
test_tc_bpf_basic:PASS:bpf_tc_attach replace mode 0 nsec
test_tc_bpf_basic:PASS:bpf_tc_query 0 nsec
test_tc_bpf_basic:PASS:handle set 0 nsec
test_tc_bpf_basic:PASS:priority set 0 nsec
test_tc_bpf_basic:PASS:prog_id set 0 nsec
libbpf: Kernel error message: Failed to send filter delete notification
test_tc_bpf_basic:FAIL:bpf_tc_detach unexpected error: -3 (errno 3)
test_tc_bpf:FAIL:test_tc_internal ingress unexpected error: -3 (errno 3)
#132 tc_bpf:FAIL
The failure seems due to the commit
cfdf0d9ae75b ("rtnetlink: use nlmsg_notify() in rtnetlink_send()")
Without the above commit, rtnetlink_send() will return 0 even if
netlink_broadcast() (called by rtnetlink_send())
returns an error. The above commit makes it return
an error code if netlink_broadcast() failed.
Such a rtnetlink_send() return value change impacted the return value
for tfilter_del_notify(), in sched/cls_api.c, in the above test.
Previously return 0, now return -3 (-ESRCH), causing the test failure.
I am not sure what is the proper solution to address this.
Should we just adjust test, or kernel change is also needed?
Kumar, Yajun, could you take a look?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bpf selftest tc_bpf failed with latest bpf-next
2021-07-18 19:29 bpf selftest tc_bpf failed with latest bpf-next Yonghong Song
@ 2021-07-19 4:11 ` yajun.deng
0 siblings, 0 replies; 2+ messages in thread
From: yajun.deng @ 2021-07-19 4:11 UTC (permalink / raw)
To: Yonghong Song, bpf, Kumar Kartikeya Dwivedi
July 19, 2021 3:29 AM, "Yonghong Song" <yhs@fb.com> wrote:
> The bpf selftest tc_bpf failed with latest bpf-next. The following is the command to run and the
> result:
>
> $ ./test_progs -n 132
> [ 40.947571] bpf_testmod: loading out-of-tree module taints kernel.
> test_tc_bpf:PASS:test_tc_bpf__open_and_load 0 nsec
> test_tc_bpf:PASS:bpf_tc_hook_create(BPF_TC_INGRESS) 0 nsec
> test_tc_bpf:PASS:bpf_tc_hook_create invalid hook.attach_point 0 nsec
> test_tc_bpf_basic:PASS:bpf_obj_get_info_by_fd 0 nsec
> test_tc_bpf_basic:PASS:bpf_tc_attach 0 nsec
> test_tc_bpf_basic:PASS:handle set 0 nsec
> test_tc_bpf_basic:PASS:priority set 0 nsec
> test_tc_bpf_basic:PASS:prog_id set 0 nsec
> test_tc_bpf_basic:PASS:bpf_tc_attach replace mode 0 nsec
> test_tc_bpf_basic:PASS:bpf_tc_query 0 nsec
> test_tc_bpf_basic:PASS:handle set 0 nsec
> test_tc_bpf_basic:PASS:priority set 0 nsec
> test_tc_bpf_basic:PASS:prog_id set 0 nsec
> libbpf: Kernel error message: Failed to send filter delete notification
> test_tc_bpf_basic:FAIL:bpf_tc_detach unexpected error: -3 (errno 3)
> test_tc_bpf:FAIL:test_tc_internal ingress unexpected error: -3 (errno 3)
> #132 tc_bpf:FAIL
>
> The failure seems due to the commit
> cfdf0d9ae75b ("rtnetlink: use nlmsg_notify() in rtnetlink_send()")
>
> Without the above commit, rtnetlink_send() will return 0 even if
> netlink_broadcast() (called by rtnetlink_send())
> returns an error. The above commit makes it return
> an error code if netlink_broadcast() failed.
>
> Such a rtnetlink_send() return value change impacted the return value
> for tfilter_del_notify(), in sched/cls_api.c, in the above test.
> Previously return 0, now return -3 (-ESRCH), causing the test failure.
>
> I am not sure what is the proper solution to address this.
> Should we just adjust test, or kernel change is also needed?
Thanks report that, I'll route a patch to fix this in next submit.
>
> Kumar, Yajun, could you take a look?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-19 4:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18 19:29 bpf selftest tc_bpf failed with latest bpf-next Yonghong Song
2021-07-19 4:11 ` yajun.deng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).