]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf/xdp_redirect_multi: Limit the tests in netns
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 27 Oct 2021 03:35:53 +0000 (11:35 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 5 Nov 2021 15:42:56 +0000 (16:42 +0100)
commit65707f11053314d0610211af96054e39e087bb83
tree9460abe59756d80b2efaebd1154387e8e0901ac1
parent0bdc4b53f7007c6eda9e5733395dee82286e5581
selftests/bpf/xdp_redirect_multi: Limit the tests in netns

As I want to test both DEVMAP and DEVMAP_HASH in XDP multicast redirect, I
limited DEVMAP max entries to a small value for performace. When the test
runs after amount of interface creating/deleting tests. The interface index
will exceed the map max entries and xdp_redirect_multi will error out with
"Get interfacesInterface index to large".

Fix this issue by limit the tests in netns and specify the ifindex when
creating interfaces.

Fixes: a6bc42d13dd6 ("selftests/bpf: Add xdp_redirect_multi test")
Reported-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211027033553.962413-5-liuhangbin@gmail.com
tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
tools/testing/selftests/bpf/xdp_redirect_multi.c