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: i386-buildonly-randconfig-001-20241101 (https://download.01.org/0day-ci/archive/20241101/202411012119.5fFOfrH9-lkp@xxxxxxxxx/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241101/202411012119.5fFOfrH9-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202411012119.5fFOfrH9-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from kernel/bpf/syscall.c:4: In file included from include/linux/bpf.h:21: In file included from include/linux/kallsyms.h:13: In file included from include/linux/mm.h:2213: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> kernel/bpf/syscall.c:254:59: error: too many arguments to function call, expected 4, have 5 254 | return sock_map_update_elem_sys(map, key, value, flags, target_cpu); | ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ include/linux/bpf.h:3175:19: note: 'sock_map_update_elem_sys' declared here 3175 | static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3176 | u64 flags) | ~~~~~~~~~ kernel/bpf/syscall.c:5961:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion] 5961 | .arg2_type = ARG_PTR_TO_MEM | MEM_RDONLY, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ kernel/bpf/syscall.c:6011:41: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion] 6011 | .arg4_type = ARG_PTR_TO_FIXED_SIZE_MEM | MEM_UNINIT | MEM_WRITE | MEM_ALIGNED, | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ 3 warnings and 1 error generated. vim +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