Re: [PATCH RFC bpf-next v2 03/18] bpf: Implement lookup, delete, update for resizable hashtab

Alexei Starovoitov
2026-04-12T23:10:27Z

On Wed, Apr 8, 2026 at 8:10 AM Mykyta Yatsenko
<mykyta.yatsenko5@gmail.com> wrote:
>
>
> +static void *rhtab_lookup_elem(struct bpf_map *map, void *key)
> +{
> + struct bpf_rhtab *rhtab = container_of(map, struct bpf_rhtab, map);
> + /* Using constant zeroed params to force rhashtable use inlined hashfunc */
> + static const struct rhashtable_params params = { 0 };
> +
> + return rhashtable_lookup_likely(&rhtab->ht, key, params);

How does the asm look like?
Please share 'perf report' or 'perf annotate' for lookup.
Maybe worth it to include in commit log.

> +}
> +
> static void *rhtab_map_lookup_elem(struct bpf_map *map, void *key) __must_hold(RCU)
> {
> - return NULL;

imo there is no point in such a step by step introduction.
Patches 1,2,3 can be squashed.