On Tue, 2025-07-22 at 01:08 +0800, Leon Hwang wrote: [...] > > > @@ -1941,19 +1945,25 @@ int generic_map_update_batch(struct bpf_map *map, struct file *map_file, > > > { > > > void __user *values = u64_to_user_ptr(attr->batch.values); > > > void __user *keys = u64_to_user_ptr(attr->batch.keys); > > > - u32 value_size, cp, max_count; > > > + u32 value_size, cp, max_count, cpu = attr->batch.cpu; > > > + u64 elem_flags = attr->batch.elem_flags; > > > void *key, *value; > > > int err = 0; > > > > > > - if (attr->batch.elem_flags & ~BPF_F_LOCK) > > > + if (elem_flags & ~(BPF_F_LOCK | BPF_F_CPU)) > > > return -EINVAL; > > > > > > - if ((attr->batch.elem_flags & BPF_F_LOCK) && > > > + if ((elem_flags & BPF_F_LOCK) && > > > !btf_record_has_field(map->record, BPF_SPIN_LOCK)) { > > > return -EINVAL; > > > } > > > > > > - value_size = bpf_map_value_size(map); > > > + if ((elem_flags & BPF_F_CPU) && > > > + map->map_type != BPF_MAP_TYPE_PERCPU_ARRAY) > > > > nit: keep on the single line > > > > Ack. > > Btw, how many chars of one line do we allow? 100 chars? Yes, 100 chars per line (Andrii is on PTO).