diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2022-05-10 13:56:00 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-05-11 08:03:15 -0700 |
commit | db1bd7a99454db5d9003ddcd64e771e265170f5b (patch) | |
tree | 61933fc029c1e486b0b586fab567049eb776f039 /tools/testing/selftests/bpf/xdpxceiver.h | |
parent | 895b62eed2ab48c314653bcf3459521b42f9db4e (diff) |
selftests: xsk: add timeout to tests
Add a timeout to the tests so that if all packets have not been
received within 3 seconds, fail the ongoing test. Hinders a test from
dead-locking if there is something wrong.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20220510115604.8717-6-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h index 7c6bf5ed594d..79ba344d2765 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.h +++ b/tools/testing/selftests/bpf/xdpxceiver.h @@ -49,6 +49,7 @@ #define SOCK_RECONF_CTR 10 #define BATCH_SIZE 64 #define POLL_TMOUT 1000 +#define RECV_TMOUT 3 #define DEFAULT_PKT_CNT (4 * 1024) #define DEFAULT_UMEM_BUFFERS (DEFAULT_PKT_CNT / 4) #define UMEM_SIZE (DEFAULT_UMEM_BUFFERS * XSK_UMEM__DEFAULT_FRAME_SIZE) |