On Fri, 2025-09-05 at 17:45 +0100, Mykyta Yatsenko wrote: [...] > +static void *map_key_from_value(struct bpf_map *map, void *value, u32 *arr_idx) `arr_idx` is unused at every call site of this function. And even if it was used, why both set through pointer and return same value? > +{ > + if (map->map_type == BPF_MAP_TYPE_ARRAY) { > + struct bpf_array *array = container_of(map, struct bpf_array, map); > + > + *arr_idx = ((char *)value - array->value) / array->elem_size; > + return arr_idx; > + } > + BUG_ON(map->map_type != BPF_MAP_TYPE_HASH && map->map_type != BPF_MAP_TYPE_LRU_HASH); > + return (void *)value - round_up(map->key_size, 8); > +} > + [...]