[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0e7cc718-9af1-a89a-d799-31cb1a83a6a9@iogearbox.net>
Date: Mon, 8 Jun 2020 16:17:01 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Andrii Nakryiko <andriin@...com>, bpf@...r.kernel.org,
netdev@...r.kernel.org, ast@...com
Cc: andrii.nakryiko@...il.com, kernel-team@...com
Subject: Re: [PATCH bpf] selftests/bpf: fix ringbuf selftest sample counting
undeterminism
On 6/8/20 2:36 AM, Andrii Nakryiko wrote:
> Fix test race, in which background poll can get either 5 or 6 samples,
> depending on timing of notification. Prevent this by open-coding sample
> triggering and forcing notification for the very last sample only.
>
> Also switch to using atomic increments and exchanges for more obviously
> reliable counting and checking. Additionally, check expected processed sample
> counters for single-threaded use cases as well.
>
> Fixes: 9a5f25ad30e5 ("selftests/bpf: Fix sample_cnt shared between two threads")
> Signed-off-by: Andrii Nakryiko <andriin@...com>
Applied, thanks!
Powered by blists - more mailing lists