[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007140635.gsWKPSG7%lkp@intel.com>
Date: Tue, 14 Jul 2020 06:17:43 +0800
From: kernel test robot <lkp@...el.com>
To: Dmitry Yakunin <zeil@...dex-team.ru>, alexei.starovoitov@...il.com,
daniel@...earbox.net, netdev@...r.kernel.org, bpf@...r.kernel.org
Cc: kbuild-all@...ts.01.org, sdf@...gle.com
Subject: Re: [PATCH bpf-next 3/4] bpf: export some cgroup storages allocation
helpers for reusing
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-improvements-for-bpf_prog_test_run/20200714-022728
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
net/bpf/test_run.c: In function 'bpf_test_run':
>> net/bpf/test_run.c:26:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc'; did you mean 'bpf_cgroup_storage_alloc'? [-Werror=implicit-function-declaration]
26 | ret = bpf_cgroup_storages_alloc(storage, prog);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_alloc
>> net/bpf/test_run.c:68:2: error: implicit declaration of function 'bpf_cgroup_storages_free'; did you mean 'bpf_cgroup_storage_free'? [-Werror=implicit-function-declaration]
68 | bpf_cgroup_storages_free(storage);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_free
cc1: some warnings being treated as errors
vim +26 net/bpf/test_run.c
17
18 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
19 u32 *retval, u32 *time, bool xdp)
20 {
21 struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = { NULL };
22 u64 time_start, time_spent = 0;
23 int ret = 0;
24 u32 i;
25
> 26 ret = bpf_cgroup_storages_alloc(storage, prog);
27 if (ret)
28 return ret;
29
30 if (!repeat)
31 repeat = 1;
32
33 rcu_read_lock();
34 migrate_disable();
35 time_start = ktime_get_ns();
36 for (i = 0; i < repeat; i++) {
37 bpf_cgroup_storage_set(storage);
38
39 if (xdp)
40 *retval = bpf_prog_run_xdp(prog, ctx);
41 else
42 *retval = BPF_PROG_RUN(prog, ctx);
43
44 if (signal_pending(current)) {
45 ret = -EINTR;
46 break;
47 }
48
49 if (need_resched()) {
50 time_spent += ktime_get_ns() - time_start;
51 migrate_enable();
52 rcu_read_unlock();
53
54 cond_resched();
55
56 rcu_read_lock();
57 migrate_disable();
58 time_start = ktime_get_ns();
59 }
60 }
61 time_spent += ktime_get_ns() - time_start;
62 migrate_enable();
63 rcu_read_unlock();
64
65 do_div(time_spent, repeat);
66 *time = time_spent > U32_MAX ? U32_MAX : (u32)time_spent;
67
> 68 bpf_cgroup_storages_free(storage);
69
70 return ret;
71 }
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (49241 bytes)
Powered by blists - more mailing lists