Re: [PATCH RFC bpf-next v2 00/18] bpf: Introduce resizable hash map

Mykyta Yatsenko
2026-04-17T15:16:37Z

On 4/17/26 7:54 AM, Herbert Xu wrote:
> On Thu, Apr 16, 2026 at 04:10:35PM +0100, Mykyta Yatsenko wrote:
>>
>> There is a problem though is the get_next_key interface:
>>
>> int get_next_key(struct bpf_map *map, void *key, void *next_key)
>
> Any chance of changing the interface?
>
> If not then perhaps a better solution is to use a linked list
> in conjunction with rhashtable. It'll cost a little bit of
> extra memory, but really provides you with the ideal solution
> for what you're trying to do.
>
> Cheers,

Changing interface is practically not possible - this comes from the bpf
syscall.
Linked list solution: we probably can't afford it performance-wise, it's
not worth it to pay for the linked list maintenance in insert/delete
operations, to make traversals work well.