Hangbin Liu <liuhangbin@xxxxxxxxx> writes: > On Mon, Apr 26, 2021 at 11:28:32AM +0200, Jesper Dangaard Brouer wrote: >> On Thu, 22 Apr 2021 15:14:54 +0800 >> Hangbin Liu <liuhangbin@xxxxxxxxx> wrote: >> >> > Add a bpf selftest for new helper xdp_redirect_map_multi(). In this >> > test there are 3 forward groups and 1 exclude group. The test will >> > redirect each interface's packets to all the interfaces in the forward >> > group, and exclude the interface in exclude map. >> > >> > Two maps (DEVMAP, DEVMAP_HASH) and two xdp modes (generic, drive) will >> > be tested. XDP egress program will also be tested by setting pkt src MAC >> > to egress interface's MAC address. >> > >> > For more test details, you can find it in the test script. Here is >> > the test result. >> > ]# ./test_xdp_redirect_multi.sh >> >> Running this test takes a long time around 3 minutes. > > Yes, there are some sleeps, ping tests. Don't know if I missed > anything, is there a time limit for the selftest? Not formally, but we already get complaints about tests running too long, and if you write a test that takes three minutes to run you all but guarantee that no one is going to run it in practice... :) You could play with things like decreasing the ping interval (with -i), maybe running fewer of them, and getting rid of all those 'sleep' statements to decrease the runtime... -Toke