aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2024-12-06 19:06:17 +0800
committerAlexei Starovoitov <[email protected]>2024-12-06 09:14:26 -0800
commit532d6b36b2bfac5514426a97a4df8d103d700d43 (patch)
treef35658f3fae7f2f7450b8ce59b38f7d29e148a15 /tools/testing/selftests/bpf/prog_tests/autoload.c
parenteae6a075e9537dd69891cf77ca5a88fa8a28b4a1 (diff)
bpf: Handle in-place update for full LPM trie correctly
When a LPM trie is full, in-place updates of existing elements incorrectly return -ENOSPC. Fix this by deferring the check of trie->n_entries. For new insertions, n_entries must not exceed max_entries. However, in-place updates are allowed even when the trie is full. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Hou Tao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions