bpf: Factor out htab_elem_value helper()
All hash maps store map key and map value together. The relative offset of the map value compared to the map key is round_up(key_size, 8). Therefore, factor out a common helper htab_elem_value() to calculate the address of the map value instead of duplicating the logic. Acked-by:Andrii Nakryiko <andrii@kernel.org> Signed-off-by:
Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250401062250.543403-2-houtao@huaweicloud.com Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Loading
Please sign in to comment