[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <84554ad2-befc-46f0-b5e1-574606ae9fee@bootlin.com>
Date: Fri, 11 Oct 2024 13:50:50 +0200
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, "David S. Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman <eddyz87@...il.com>,
Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Mykola Lysenko <mykolal@...com>, Shuah Khan <shuah@...nel.org>,
ebpf@...uxfoundation.org, Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 2/3] selftests/bpf: make xdp_cpumap_attach
keep redirect prog attached
Hello Martin,
On 10/11/24 03:23, Martin KaFai Lau wrote:
> On 10/9/24 3:12 AM, Alexis Lothoré (eBPF Foundation) wrote:
>> - int err, prog_fd, map_fd;
>> + int err, prog_fd, prog_redir_fd, map_fd;
>> + struct nstoken *nstoken = NULL;
>> __u32 idx = 0;
>> + SYS(out_close, "ip netns add %s", TEST_NS);
>> + nstoken = open_netns(TEST_NS);
>> + if (!ASSERT_OK_PTR(nstoken, "open_netns"))
>> + goto out_close;
>> + SYS(out_close, "ip link set dev lo up");
>
> There is easier helper netns_{new,free} to do all these:
> netns_obj = netns_new(TEST_NS, true);
>
> Only fyi for your future work.
ACK, thanks !
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists