Re: [PATCH bpf-next v2 1/3] bpf: Introduce BPF_F_CPU flag for percpu_array maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat Aug 9, 2025 at 12:23 AM +08, Alexei Starovoitov wrote:
> On Fri, Aug 8, 2025 at 9:11 AM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
>>
>> On Fri Aug 8, 2025 at 1:20 AM +08, Alexei Starovoitov wrote:
>> > On Tue, Aug 5, 2025 at 9:30 AM Leon Hwang <leon.hwang@xxxxxxxxx> wrote:
>> >>

[...]

>> >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> >> index 233de8677382e..67bc35e4d6a8d 100644
>> >> --- a/include/uapi/linux/bpf.h
>> >> +++ b/include/uapi/linux/bpf.h
>> >> @@ -1372,6 +1372,12 @@ enum {
>> >>         BPF_NOEXIST     = 1, /* create new element if it didn't exist */
>> >>         BPF_EXIST       = 2, /* update existing element */
>> >>         BPF_F_LOCK      = 4, /* spin_lock-ed map_lookup/map_update */
>> >> +       BPF_F_CPU       = 8, /* map_update for percpu_array */
>> >
>> > only percpu_array?!
>> > Aren't you doing it for percpu_hash too?
>> >
>>
>> Only percpu_array in this patchset.
>>
>> I have no need to do it for percpu_hash.
>
> You're missing the point. If we're adding the flag it should
> work for all per-cpu maps. Both array and hash.
>
> Same issue as with your other patch with common_attr.
> We're not adding a feature that works for 1 out 10
> commands/map types/whatever and doesn't work for the rest.
> Flags/features have to be generic and consistent.

Get it. I'll do it for other percpu maps in next revision.

Thanks,
Leon





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux