Re: [PATCH v5 bpf-next 3/3] bpf: add selftest for BPF_ENABLE_STATS

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

 



On Tue, Apr 28, 2020 at 3:09 PM Song Liu <songliubraving@xxxxxx> wrote:
> >> +
> >> +struct {
> >> +    __uint(type, BPF_MAP_TYPE_ARRAY);
> >> +    __uint(max_entries, 1);
> >> +    __type(key, __u32);
> >> +    __type(value, __u64);
> >> +} count SEC(".maps");
> >
> > Looks like a global variable can be used here?
>
> We can use global variable. But it doesn't really matter for this test.
> Any BPF program will work here. Do we really need a v6 for this change?

yes. please.
Otherwise folks will copy paste this inefficiency into future tests.



[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