OSDN Git Service

selftests: xsk: Simplify the retry code
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 25 Aug 2021 09:37:11 +0000 (11:37 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 25 Aug 2021 19:22:00 +0000 (12:22 -0700)
commit1314c3537f661002a65999784c0f3f42d7de87f6
treeb446c9c574ee3b5e7475b87ce8ec11b1dd791ac5
parent083be682d97695979e1bdfac1d4274234555f77b
selftests: xsk: Simplify the retry code

Simplify the retry code and make it more efficient by waiting first,
instead of trying immediately which always fails due to the
asynchronous nature of xsk socket close. Also decrease the wait time
to significantly lower the run-time of the test suite.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-6-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h