Re: [PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Andrii Nakryiko
On Mon, Sep 23, 2019 at 8:38 AM Stanislav Fomichev wrote: > > On 09/22, Andrii Nakryiko wrote: > > On Sun, Sep 22, 2019 at 12:10 PM Stanislav Fomichev wrote: > > > > > > This is the same problem I found earlier in test_sockopt_inherit: > > > there is a race between server thread doing accept() an

Re: [PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Stanislav Fomichev
On 09/22, Andrii Nakryiko wrote: > On Sun, Sep 22, 2019 at 12:10 PM Stanislav Fomichev wrote: > > > > This is the same problem I found earlier in test_sockopt_inherit: > > there is a race between server thread doing accept() and client > > thread doing connect(). Let's explicitly synchronize them

Re: [PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-22 Thread Andrii Nakryiko
On Sun, Sep 22, 2019 at 12:10 PM Stanislav Fomichev wrote: > > This is the same problem I found earlier in test_sockopt_inherit: > there is a race between server thread doing accept() and client > thread doing connect(). Let's explicitly synchronize them via > pthread conditional variable. > > Fix

[PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-20 Thread Stanislav Fomichev
This is the same problem I found earlier in test_sockopt_inherit: there is a race between server thread doing accept() and client thread doing connect(). Let's explicitly synchronize them via pthread conditional variable. Fixes: b55873984dab ("selftests/bpf: test BPF_SOCK_OPS_RTT_CB") Signed-off-b