]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie
authorHou Tao <houtao1@huawei.com>
Fri, 6 Dec 2024 11:06:16 +0000 (19:06 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Dec 2024 17:14:26 +0000 (09:14 -0800)
commiteae6a075e9537dd69891cf77ca5a88fa8a28b4a1
tree27fa885d13b42dac23fd4c265893fd8760784eca
parent3d5611b4d7efbefb85a74fcdbc35c603847cc022
bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie

Add the currently missing handling for the BPF_EXIST and BPF_NOEXIST
flags. These flags can be specified by users and are relevant since LPM
trie supports exact matches during update.

Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation")
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20241206110622.1161752-4-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/lpm_trie.c