Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test
From: Alexis Lothoré
Date: Wed Nov 13 2024 - 09:24:12 EST
On 11/13/24 14:53, Alexis Lothoré (eBPF Foundation) wrote:
[...]
> + ns = open_netns(TEST_NS);
> + bpf_prog_detach2(prog_fd, 0, BPF_FLOW_DISSECTOR);
> + close_netns(ns);
I would like to mention that I initially planned to directly delete the
namespace to perform the test cleanup, assuming it would be enough to consider
any non-root namespace flow_dissector to be removed. However I observed that it
made other tests dealing with flow_dissector starting to fail with -EEXIST,
despite all those tests being marked as "serial". I started examining this,
suspecting a real issue (a race between namespace deletion and flow dissector
attachment check, or a ns refcount issue) but before going further: is my
assumption right ? Should a mere namespace deletion be indeed enough to remove
the corresponding bpf flow dissector ? Or am I missing something ? If so I'll
keep examining this.
> +out_clean_ns:
> + remove_netns(TEST_NS);
> +out_destroy_skel:
> + bpf_flow__destroy(skel);
> +}
> +
> static int create_tap(const char *ifname)
> {
> struct ifreq ifr = {
>
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com