Re: [PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-06 Thread Yan Zhai
On Thu, Feb 6, 2025 at 2:20 AM Yan Zhai wrote: > > On Thu, Feb 6, 2025 at 12:40 AM Hou Tao wrote: > > > > > > > > Yes, the retry logic doesn't change the previous key. Thanks for the > > clarifying. > > > And by "skipping to the next key", it's simply > > > > > > if (err == -ENOENT) > > >

Re: [PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-06 Thread Yan Zhai
On Thu, Feb 6, 2025 at 12:40 AM Hou Tao wrote: > > Hi, > > On 2/6/2025 12:57 AM, Yan Zhai wrote: > > The generic_map_lookup_batch currently returns EINTR if it fails with > > ENOENT and retries several times on bpf_map_copy_value. The next batch > > would start from the same location, presuming it

Re: [PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-05 Thread Hou Tao
Hi, On 2/6/2025 12:57 AM, Yan Zhai wrote: > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same location, presuming it's a transient issue. > This is incorrect if a map can actual

[PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-05 Thread Yan Zhai
The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a k