Lorenzo Bianconi
6cc385d2cd
selftests/bpf: Add xdp_feature selftest for bond device
...
Introduce selftests to check xdp_feature support for bond driver.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Reviewed-by: Jussi Maki <joamaki@gmail.com >
Link: https://lore.kernel.org/bpf/64cb8f20e6491f5b971f8d3129335093c359aad7.1684329998.git.lorenzo@kernel.org
2023-05-23 16:22:25 +02:00
Hangbin Liu
b61987d37c
selftests/bpf: move SYS() macro into the test_progs.h
...
A lot of tests defined SYS() macro to run system calls with goto label.
Let's move this macro to test_progs.h and add configurable
"goto_label" as the first arg.
Suggested-by: Martin KaFai Lau <martin.lau@linux.dev >
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com >
Link: https://lore.kernel.org/r/20230224061343.506571-2-liuhangbin@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org >
2023-02-24 17:34:09 -08:00
Andrii Nakryiko
43080b7106
selftests/bpf: Fix misaligned memory accesses in xdp_bonding test
...
Construct packet buffer explicitly for each packet to avoid unaligned
memory accesses.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/20211124002325.1737739-13-andrii@kernel.org
2021-11-26 00:15:03 +01:00
Yucong Sun
d3f7b1664d
selfetest/bpf: Make some tests serial
...
Change tests that often fails in parallel execution mode to serial.
Signed-off-by: Yucong Sun <sunyucong@gmail.com >
Signed-off-by: Andrii Nakryiko <andrii@kernel.org >
Link: https://lore.kernel.org/bpf/20211006185619.364369-15-fallentree@fb.com
2021-10-08 15:17:00 -07:00
Jussi Maki
4a9c93dc47
selftests/bpf: Test XDP bonding nest and unwind
...
Modify the test to check that enslaving a bond slave with a XDP program
is now allowed.
Extend attach test to exercise the program unwinding in bond_xdp_set and
add a new test for loading XDP program on doubly nested bond device to
verify that static key incr/decr is correct.
Signed-off-by: Jussi Maki <joamaki@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-09-06 13:12:09 +01:00
Jussi Maki
cf7a5cba86
selftests/bpf: Fix running of XDP bonding tests
...
An "innocent" cleanup in the last version of the XDP bonding patchset moved
the "test__start_subtest" calls to the test main function, but I forgot to
reverse the condition, which lead to all tests being skipped. Fix it.
Fixes: 6aab1c81b9 ("selftests/bpf: Add tests for XDP bonding")
Signed-off-by: Jussi Maki <joamaki@gmail.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Link: https://lore.kernel.org/bpf/20210811123627.20223-1-joamaki@gmail.com
2021-08-13 23:48:16 +02:00
Jussi Maki
6aab1c81b9
selftests/bpf: Add tests for XDP bonding
...
Add a test suite to test XDP bonding implementation over a pair of
veth devices.
Signed-off-by: Jussi Maki <joamaki@gmail.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Acked-by: Andrii Nakryiko <andrii@kernel.org >
Link: https://lore.kernel.org/bpf/20210731055738.16820-8-joamaki@gmail.com
2021-08-09 23:25:15 +02:00