Re: [PATCH bpf-next] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-10 Thread Alexis Lothoré
Hey Maxime, On 9/9/24 23:18, Maxime Chevallier wrote: > Hi Alexis, > > On Mon, 09 Sep 2024 22:02:07 +0200 > Alexis Lothoré (eBPF Foundation) wrote: [...] >> +static void *run_dut_echo_thread(void *arg) >> +{ >> +struct test_data *t = (struct test_d

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-12 Thread Alexis Lothoré
to block progress. > But, FWIIW, the comment above is not a Kernel doc, yet starts with '/**'. > I suggest that it should start with '/*' instead. ACK. I'll wait for more comments on the series, and add the fix to the corresponding revision, if any. Thanks, Alexis -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH bpf-next v3 2/3] selftests/bpf: make xdp_cpumap_attach keep redirect prog attached

2024-10-11 Thread Alexis Lothoré
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; &

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-10-03 Thread Alexis Lothoré
bottom of the todo list for now. ACK, thanks -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH bpf-next 2/6] selftests/bpf: add missing ns cleanups in btf_skc_cls_ingress

2024-10-19 Thread Alexis Lothoré
Hi Martin, thanks for the review ! On 10/19/24 01:57, Martin KaFai Lau wrote: > On 10/16/24 11:35 AM, Alexis Lothoré (eBPF Foundation) wrote: >> btf_skc_cls_ingress.c currently runs two subtests, and create a >> dedicated network namespace for each, but never cleans up the creat

Re: [PATCH bpf-next 4/6] selftests/bpf: add ipv4 and dual ipv4/ipv6 support in btf_skc_cls_ingress

2024-10-19 Thread Alexis Lothoré
On 10/19/24 02:30, Martin KaFai Lau wrote: > On 10/16/24 11:35 AM, Alexis Lothoré (eBPF Foundation) wrote: [...] >>   +    switch (ip_mode) { >> +    case TEST_MODE_IPV4: >> +    sock_family = AF_INET; >> +    srv_addr = SERVER_ADDR_IPV4; >> +  

Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-13 Thread Alexis Lothoré
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 tes

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-22 Thread Alexis Lothoré
v ? Or it is a bigger hint that the whole test about xdp features could be moved there (and then tested by net kselftests rather than by ebpf ci specifically) ? @Lorenzo and eBPF tests maintainers, any opinion ? Thanks, Alexis -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-26 Thread Alexis Lothoré
logic as the series in progress you have pointed. Once done, test_xdp_features.sh could be let as-is. Let me know if we should stillmove it elsewhere instead of keeping it in selftests (tools/bpf/xdp_features/ maybe ?) And noted for the most relevant tests to convert after that, thanks :)

Re: [PATCH bpf-next v2 09/13] selftests/bpf: move ip checksum helper to network helpers

2024-11-19 Thread Alexis Lothoré
Hello Stanislas, On 11/15/24 16:32, Stanislav Fomichev wrote: > On 11/14, Alexis Lothoré (eBPF Foundation) wrote: >> +static unsigned long add_csum_hword(const __u16 *start, int num_u16) >> +{ >> +unsigned long sum = 0; >> +int i; >> + &

Re: [PATCH bpf-next v2 11/13] selftests/bpf: add network helpers to generate udp checksums

2024-11-19 Thread Alexis Lothoré
On 11/15/24 16:54, Stanislav Fomichev wrote: > On 11/14, Alexis Lothoré (eBPF Foundation) wrote: >> +static inline __sum16 build_udp_v4_csum(const struct iphdr *iph, __u8 >> l4_proto, >> +__u16 l4_len,

Re: [PATCH bpf-next v2 12/13] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-19 Thread Alexis Lothoré
On 11/15/24 17:11, Stanislav Fomichev wrote: > On 11/14, Alexis Lothoré (eBPF Foundation) wrote: >> +if (!ASSERT_GE(err, 0, "do_rx")) >> +break; > > You seem to be already doing similar ASSERT_GE inside the do_rx, maybe > dr

Re: [PATCH bpf-next v2 10/13] selftests/bpf: rename pseudo headers checksum computation

2024-11-20 Thread Alexis Lothoré
On 11/15/24 16:33, Stanislav Fomichev wrote: > On 11/14, Alexis Lothoré (eBPF Foundation) wrote: >> network_helpers.h provides helpers to compute checksum for pseudo >> headers but no helpers to compute the global checksums. >> >> Before adding those, rename the pseud

Re: [PATCH bpf-next 09/10] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-14 Thread Alexis Lothoré
On 11/13/24 18:58, Stanislav Fomichev wrote: > On 11/13, Alexis Lothoré (eBPF Foundation) wrote: >> test_flow_dissector.sh loads flow_dissector program and subprograms, >> creates and configured relevant tunnels and interfaces, and ensure that >> the bpf dissection is actuall

Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-14 Thread Alexis Lothoré
On 11/13/24 18:50, Stanislav Fomichev wrote: > On 11/13, Alexis Lothoré wrote: >> 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); &

Re: [PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests

2024-11-13 Thread Alexis Lothoré
Hello Stanislas, thanks for the reviews ! On 11/13/24 18:42, Stanislav Fomichev wrote: > On 11/13, Alexis Lothoré (eBPF Foundation) wrote: >> The flow_dissector runs plenty of tests over diffent kind of packets, >> grouped into three categories: skb mode, non-skb mode with direct

Re: [PATCH bpf-next v3 00/14] selftests/bpf: migrate test_flow_dissector.sh to test_progs

2024-11-26 Thread Alexis Lothoré
he automated mail answer when a series on which I am the author is merged (ie: I get the final mail thanks to ML subscription, not because I am in the recipient list). The target address looks broken: "Alexis Lothoré "@aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org I am not sure if the is

Re: [PATCH 2/3] selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c

2025-01-03 Thread Alexis Lothoré
ogs.xdp_dummy_prog ? (same for all progs below) Thanks, Alexis -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 1/3] selftests/bpf: test_xdp_redirect: Rename BPF sections

2025-01-03 Thread Alexis Lothoré
coming patch. > Update the test_xdp_redirect.sh to use the program name instead of the > section name to load the BPF program. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > LGTM :) Reviewed-by: Alexis Lothoré (eBPF Foundation) -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/3] selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c

2025-01-03 Thread Alexis Lothoré
NETWORK); > + > + close_netns(nstoken); > + > + nstoken = open_netns(NS2); > + if (!ASSERT_OK_PTR(nstoken, "open NS2")) > + goto close; > + > + SYS(close, "ping -c 1 %s.1", IPV4_NETWORK); Is it really useful to check ping orig

Re: [PATCH bpf-next v2] arm64, bpf: Add 12-argument support for bpf trampoline

2025-02-21 Thread Alexis Lothoré
evive your work to try to handle the missing points and make this feature integrated ? Thanks, Alexis [0] https://lore.kernel.org/bpf/20230917150752.69612-1-xukuo...@huaweicloud.com/ [1] https://lore.kernel.org/bpf/20240705125336.46820-1-puran...@kernel.org/ -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com