Re: [PATCH bpf-next 2/2] selftests/bpf: add inline assembly helpers to access array elements

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

 



On 1/3/24 14:51, Andrii Nakryiko wrote:
I'm curious how bpf_cmp_likely/bpf_cmp_unlikely (just applied to
bpf-next) compares to this?

these work great!

e.g.

        if (bpf_cmp_likely(idx, <, NR_MAP_ELEMS))
                map_elems[idx] = i;

works fine. since that's essentially the code that bpf_array_elem() was trying to replace, i'd rather just use the new bpf_cmp helpers than have the special array_elem helpers.

thanks,

barret






[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