On Wed, Jan 3, 2024 at 12:06 PM Barret Rhoden<brho@xxxxxxxxxx> wrote:
On 1/3/24 14:51, Andrii Nakryiko wrote:ok, cool, thanks for checking! The less special macros, the better.
I'm curious how bpf_cmp_likely/bpf_cmp_unlikely (just applied tothese work great!
bpf-next) compares to this?
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.