From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
Shuah Khan <shuah@kernel.org>,
ebpf@linuxfoundation.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 2/3] selftests/bpf: make xdp_cpumap_attach keep redirect prog attached
Date: Fri, 11 Oct 2024 13:50:50 +0200 [thread overview]
Message-ID: <84554ad2-befc-46f0-b5e1-574606ae9fee@bootlin.com> (raw)
In-Reply-To: <ffd94cd8-f29e-49e8-9c6f-23be9d9b1bc5@linux.dev>
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
next prev parent reply other threads:[~2024-10-11 11:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 10:12 [PATCH bpf-next v3 0/3] selftests/bpf: add coverage for xdp_features in test_progs Alexis Lothoré (eBPF Foundation)
2024-10-09 10:12 ` [PATCH bpf-next v3 1/3] selftests/bpf: fix bpf_map_redirect call for cpu map test Alexis Lothoré (eBPF Foundation)
2024-10-09 10:12 ` [PATCH bpf-next v3 2/3] selftests/bpf: make xdp_cpumap_attach keep redirect prog attached Alexis Lothoré (eBPF Foundation)
2024-10-11 1:23 ` Martin KaFai Lau
2024-10-11 11:50 ` Alexis Lothoré [this message]
2024-10-09 10:12 ` [PATCH bpf-next v3 3/3] selftests/bpf: check program redirect in xdp_cpumap_attach Alexis Lothoré (eBPF Foundation)
2024-10-11 1:10 ` [PATCH bpf-next v3 0/3] selftests/bpf: add coverage for xdp_features in test_progs patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84554ad2-befc-46f0-b5e1-574606ae9fee@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=ebpf@linuxfoundation.org \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox