From: kernel test robot <lkp@intel.com>
To: mrpre <mrpre@163.com>,
yonghong.song@linux.dev, john.fastabend@gmail.com,
martin.lau@kernel.org, edumazet@google.com, jakub@cloudflare.com,
davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, mrpre <mrpre@163.com>
Subject: Re: [PATCH 1/2] bpf: Introduce cpu affinity for sockmap
Date: Fri, 1 Nov 2024 22:02:01 +0800 [thread overview]
Message-ID: <202411012135.447KNHZK-lkp@intel.com> (raw)
In-Reply-To: <20241101023832.32404-1-mrpre@163.com>
Hi mrpre,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net-next/main net/main linus/master v6.12-rc5 next-20241101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/mrpre/bpf-implement-libbpf-sockmap-cpu-affinity/20241101-104144
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20241101023832.32404-1-mrpre%40163.com
patch subject: [PATCH 1/2] bpf: Introduce cpu affinity for sockmap
config: arc-randconfig-001-20241101 (https://download.01.org/0day-ci/archive/20241101/202411012135.447KNHZK-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241101/202411012135.447KNHZK-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411012135.447KNHZK-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/bpf/syscall.c: In function 'bpf_map_update_value':
>> kernel/bpf/syscall.c:254:24: error: too many arguments to function 'sock_map_update_elem_sys'
254 | return sock_map_update_elem_sys(map, key, value, flags, target_cpu);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/syscall.c:4:
include/linux/bpf.h:3175:19: note: declared here
3175 | static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value,
| ^~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
vim +/sock_map_update_elem_sys +254 kernel/bpf/syscall.c
240
241 static int bpf_map_update_value(struct bpf_map *map, struct file *map_file,
242 void *key, void *value, __u64 flags, s32 target_cpu)
243 {
244 int err;
245 /* Need to create a kthread, thus must support schedule */
246 if (bpf_map_is_offloaded(map)) {
247 return bpf_map_offload_update_elem(map, key, value, flags);
248 } else if (map->map_type == BPF_MAP_TYPE_CPUMAP ||
249 map->map_type == BPF_MAP_TYPE_ARENA ||
250 map->map_type == BPF_MAP_TYPE_STRUCT_OPS) {
251 return map->ops->map_update_elem(map, key, value, flags);
252 } else if (map->map_type == BPF_MAP_TYPE_SOCKHASH ||
253 map->map_type == BPF_MAP_TYPE_SOCKMAP) {
> 254 return sock_map_update_elem_sys(map, key, value, flags, target_cpu);
255 } else if (IS_FD_PROG_ARRAY(map)) {
256 return bpf_fd_array_map_update_elem(map, map_file, key, value,
257 flags);
258 }
259
260 bpf_disable_instrumentation();
261 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH ||
262 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH) {
263 err = bpf_percpu_hash_update(map, key, value, flags);
264 } else if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) {
265 err = bpf_percpu_array_update(map, key, value, flags);
266 } else if (map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) {
267 err = bpf_percpu_cgroup_storage_update(map, key, value,
268 flags);
269 } else if (IS_FD_ARRAY(map)) {
270 err = bpf_fd_array_map_update_elem(map, map_file, key, value,
271 flags);
272 } else if (map->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) {
273 err = bpf_fd_htab_map_update_elem(map, map_file, key, value,
274 flags);
275 } else if (map->map_type == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY) {
276 /* rcu_read_lock() is not needed */
277 err = bpf_fd_reuseport_array_update_elem(map, key, value,
278 flags);
279 } else if (map->map_type == BPF_MAP_TYPE_QUEUE ||
280 map->map_type == BPF_MAP_TYPE_STACK ||
281 map->map_type == BPF_MAP_TYPE_BLOOM_FILTER) {
282 err = map->ops->map_push_elem(map, value, flags);
283 } else {
284 err = bpf_obj_pin_uptrs(map->record, value);
285 if (!err) {
286 rcu_read_lock();
287 err = map->ops->map_update_elem(map, key, value, flags);
288 rcu_read_unlock();
289 if (err)
290 bpf_obj_unpin_uptrs(map->record, value);
291 }
292 }
293 bpf_enable_instrumentation();
294
295 return err;
296 }
297
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-11-01 14:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 2:38 [PATCH 1/2] bpf: Introduce cpu affinity for sockmap mrpre
2024-11-01 2:38 ` [PATCH 2/2] bpf: implement libbpf sockmap cpu affinity mrpre
2024-11-01 13:20 ` [PATCH 1/2] bpf: Introduce cpu affinity for sockmap kernel test robot
2024-11-01 14:02 ` kernel test robot [this message]
2024-11-01 19:25 ` Andrii Nakryiko
2024-11-04 6:12 ` Jiayuan Chen
2024-11-06 21:43 ` Andrii Nakryiko
2024-11-06 13:49 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202411012135.447KNHZK-lkp@intel.com \
--to=lkp@intel.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=mrpre@163.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).