]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Extract generic string hashing function for reuse
authorAndrii Nakryiko <andriin@fb.com>
Sat, 26 Sep 2020 01:13:52 +0000 (18:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Sep 2020 00:27:31 +0000 (17:27 -0700)
commit07aba066e0a5082a0f61939c9d6c850b8e4c5f8d
treeec6765ac143da67147fabf28281deee6d8a9050d
parentc20eea96b5d5e0ff5e42208c208bab02409f3393
libbpf: Extract generic string hashing function for reuse

Calculating a hash of zero-terminated string is a common need when using
hashmap, so extract it for reuse.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200926011357.2366158-5-andriin@fb.com
tools/lib/bpf/btf_dump.c
tools/lib/bpf/hashmap.h