summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdpxceiver.h
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2021-03-30 00:43:09 +0200
committerAlexei Starovoitov <ast@kernel.org>2021-03-30 09:24:39 -0700
commit99f9bcb65705dda07288b759c569d30d8a4f297c (patch)
treebd67836a0b229d493303614e9979f6bc945cb4d2 /tools/testing/selftests/bpf/xdpxceiver.h
parent9866bcd6635c264aaf3de1d89e44773a269048eb (diff)
selftests: xsk: Remove Tx synchronization resources
Tx thread needs to be started after the Rx side is fully initialized so that packets are not xmitted until xsk Rx socket is ready to be used. It can be observed that atomic variable spinning_tx is not checked from Rx side in any way, so thread_common_ops can be modified to only address the spinning_rx. This means that spinning_tx can be removed altogheter. signal_tx_condition is never utilized, so simply remove it. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210329224316.17793-11-maciej.fijalkowski@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
-rw-r--r--tools/testing/selftests/bpf/xdpxceiver.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h
index 493f7498d40e..483be41229c6 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.h
+++ b/tools/testing/selftests/bpf/xdpxceiver.h
@@ -144,12 +144,10 @@ struct ifobject {
static struct ifobject *ifdict[MAX_INTERFACES];
/*threads*/
-atomic_int spinning_tx;
atomic_int spinning_rx;
pthread_mutex_t sync_mutex;
pthread_mutex_t sync_mutex_tx;
pthread_cond_t signal_rx_condition;
-pthread_cond_t signal_tx_condition;
pthread_t t0, t1;
pthread_attr_t attr;