Re: [PATCH bpf-next v10 02/12] selftests/bpf: Use start_server_str in sockmap_ktls

2024-07-08 Thread Geliang Tang
On Mon, 2024-07-08 at 10:29 +0800, Geliang Tang wrote: > > > > From: Geliang Tang > > > > > > > > Include network_helpers.h in prog_tests/sockmap_ktls.c, use > > > > public > > > > network > > > > helper start_server_str() instead of local defined function > > > > tcp_server(). > > > > This can a

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

2024-07-08 Thread Puranjay Mohan
Xu Kuohai writes: > On 7/5/2024 8:53 PM, Puranjay Mohan wrote: >> The arm64 bpf JIT currently supports attaching the trampoline to >> functions with <= 8 arguments. This is because up to 8 arguments can be >> passed in registers r0-r7. If there are more than 8 arguments then the >> 9th and later

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

2024-07-08 Thread Xu Kuohai
On 7/8/2024 5:00 PM, Puranjay Mohan wrote: Xu Kuohai writes: On 7/5/2024 8:53 PM, Puranjay Mohan wrote: The arm64 bpf JIT currently supports attaching the trampoline to functions with <= 8 arguments. This is because up to 8 arguments can be passed in registers r0-r7. If there are more than 8

Re: [PATCH bpf-next 2/2] selftests/bpf: amend for wrong bpf_wq_set_callback_impl signature

2024-07-08 Thread Benjamin Tissoires
On Jul 06 2024, Alexei Starovoitov wrote: > On Fri, Jul 5, 2024 at 1:54 PM Eduard Zingerman wrote: > > > > On Fri, 2024-07-05 at 15:44 +0200, Benjamin Tissoires wrote: > > > See the previous patch: the API was wrong, we were provided the pointer > > > to the value, not the actual struct bpf_wq *.

[PATCH bpf-next v2 0/2] Small API fix for bpf_wq

2024-07-08 Thread Benjamin Tissoires
I realized this while having a map containing both a struct bpf_timer and a struct bpf_wq: the third argument provided to the bpf_wq callback is not the struct bpf_wq pointer itself, but the pointer to the value in the map. Which means that the users need to double cast the provided "value" as thi

[PATCH bpf-next v2 2/2] selftests/bpf: amend for wrong bpf_wq_set_callback_impl signature

2024-07-08 Thread Benjamin Tissoires
See the previous patch: the API was wrong, we were provided the pointer to the value, not the actual struct bpf_wq *. Signed-off-by: Benjamin Tissoires --- changes in v2: - amended to retrieve something from the third argument of the callback --- tools/testing/selftests/bpf/bpf_experimental.h

[PATCH bpf-next v2 1/2] bpf: helpers: fix bpf_wq_set_callback_impl signature

2024-07-08 Thread Benjamin Tissoires
I realized this while having a map containing both a struct bpf_timer and a struct bpf_wq: the third argument provided to the bpf_wq callback is not the struct bpf_wq pointer itself, but the pointer to the value in the map. Which means that the users need to double cast the provided "value" as thi

[PATCH v1] selftests: openvswitch: retry instead of sleep

2024-07-08 Thread Adrian Moreno
There are a couple of places where the test script "sleep"s to wait for some external condition to be met. This is error prone, specially in slow systems (identified in CI by "KSFT_MACHINE_SLOW=yes"). To fix this, add a "ovs_wait" function that tries to execute a command a few times until it succ

[PATCH] kselftests: dmabuf-heaps: Ensure the driver name is null-terminated

2024-07-08 Thread Zenghui Yu
Even if a vgem device is configured in, we will skip the import_vgem_fd() test almost every time. TAP version 13 1..11 # Testing heap: system # === # Testing allocation and importing: ok 1 # SKIP Could not open vgem -1 The problem is that we use the

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Daniel Borkmann
On 7/5/24 4:50 PM, Puranjay Mohan wrote: fexit_sleep test runs successfully now on the CI so remove it from the deny list. Do you happen to know which commit fixed it? If yes, might be nice to have it documented in the commit message. Signed-off-by: Puranjay Mohan --- tools/testing/selftes

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Puranjay Mohan
Daniel Borkmann writes: > On 7/5/24 4:50 PM, Puranjay Mohan wrote: >> fexit_sleep test runs successfully now on the CI so remove it from the >> deny list. > > Do you happen to know which commit fixed it? If yes, might be nice to have it > documented in the commit message. Actually, I never saw t

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread KP Singh
On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: > > Daniel Borkmann writes: > > > On 7/5/24 4:50 PM, Puranjay Mohan wrote: > >> fexit_sleep test runs successfully now on the CI so remove it from the > >> deny list. > > > > Do you happen to know which commit fixed it? If yes, might be nice to

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Daniel Borkmann
On 7/8/24 5:26 PM, KP Singh wrote: On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: Daniel Borkmann writes: On 7/5/24 4:50 PM, Puranjay Mohan wrote: fexit_sleep test runs successfully now on the CI so remove it from the deny list. Do you happen to know which commit fixed it? If yes,

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Florent Revest
On Mon, Jul 8, 2024 at 5:29 PM Daniel Borkmann wrote: > > On 7/8/24 5:26 PM, KP Singh wrote: > > On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: > >> > >> Daniel Borkmann writes: > >> > >>> On 7/5/24 4:50 PM, Puranjay Mohan wrote: > fexit_sleep test runs successfully now on the CI so r

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Puranjay Mohan
Daniel Borkmann writes: > On 7/8/24 5:26 PM, KP Singh wrote: >> On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: >>> >>> Daniel Borkmann writes: >>> On 7/5/24 4:50 PM, Puranjay Mohan wrote: > fexit_sleep test runs successfully now on the CI so remove it from the > deny list. >>

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread Daniel Borkmann
On 7/8/24 5:35 PM, Puranjay Mohan wrote: Daniel Borkmann writes: On 7/8/24 5:26 PM, KP Singh wrote: On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: Daniel Borkmann writes: On 7/5/24 4:50 PM, Puranjay Mohan wrote: fexit_sleep test runs successfully now on the CI so remove it from t

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-08 Thread Reinette Chatre
Hi Maciej, On 7/4/24 12:23 AM, Maciej Wieczor-Retman wrote: On 2024-07-03 at 13:51:03 -0700, Reinette Chatre wrote: On 7/3/24 12:43 AM, Maciej Wieczór-Retman wrote: On 3.07.2024 00:21, Reinette Chatre wrote: On 7/1/24 7:18 AM, Maciej Wieczor-Retman wrote: ... SNC might not be enabled at a

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread KP Singh
On Mon, Jul 8, 2024 at 6:09 PM Daniel Borkmann wrote: > > On 7/8/24 5:35 PM, Puranjay Mohan wrote: > > Daniel Borkmann writes: > > > >> On 7/8/24 5:26 PM, KP Singh wrote: > >>> On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote: > > Daniel Borkmann writes: > > > On 7/5/24 4:

Re: [PATCH] kselftests: dmabuf-heaps: Ensure the driver name is null-terminated

2024-07-08 Thread T.J. Mercier
On Mon, Jul 8, 2024 at 6:47 AM Zenghui Yu wrote: > > Even if a vgem device is configured in, we will skip the import_vgem_fd() > test almost every time. > > TAP version 13 > 1..11 > # Testing heap: system > # === > # Testing allocation and importing: >

Re: [PATCH v1] selftests: openvswitch: retry instead of sleep

2024-07-08 Thread Aaron Conole
Adrian Moreno writes: > There are a couple of places where the test script "sleep"s to wait for > some external condition to be met. > > This is error prone, specially in slow systems (identified in CI by > "KSFT_MACHINE_SLOW=yes"). > > To fix this, add a "ovs_wait" function that tries to execute

Re: [PATCH bpf-next v2 2/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK

2024-07-08 Thread Andrii Nakryiko
On Thu, Jul 4, 2024 at 7:38 PM Geliang Tang wrote: > > From: Geliang Tang > > Just like handling ENOTSUPP in test_lsm_cgroup_functional(), this patch > adds a new helper test_progs_get_error() to check whether the input error > is ENOTSUPP (524) or ENOTSUP (95). If it is, invoke test__skip() to s

Re: [PATCH 6/6] selftests/bpf: Skip ENOTSUPP in ASSERT_GE

2024-07-08 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 11:48 PM Geliang Tang wrote: > > From: Geliang Tang > > There are still some "ENOTSUPP" (-524) errors left when running BPF > selftests on a Loongarch platform since ASSERT_GE() are used there to > check the return values, not ASSERT_OK(): > > ''' > test_bpf_cookie:PASS:sk

Re: [PATCH bpf-next v10 06/12] selftests/bpf: Add expect_errno for network_helper_opts

2024-07-08 Thread Eduard Zingerman
On Mon, 2024-07-08 at 10:29 +0800, Geliang Tang wrote: [...] > diff --git a/tools/testing/selftests/bpf/network_helpers.h > b/tools/testing/selftests/bpf/network_helpers.h > index fcda6b2333ad..14d161d35248 100644 > --- a/tools/testing/selftests/bpf/network_helpers.h > +++ b/tools/testing/selfte

Re: [PATCH v1] selftests: openvswitch: retry instead of sleep

2024-07-08 Thread Adrián Moreno
On Mon, Jul 08, 2024 at 02:27:45PM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > There are a couple of places where the test script "sleep"s to wait for > > some external condition to be met. > > > > This is error prone, specially in slow systems (identified in CI by > > "KSFT_MACHINE_SLO

Re: [ovs-dev] [PATCH v1] selftests: openvswitch: retry instead of sleep

2024-07-08 Thread Ilya Maximets
On 7/8/24 15:44, Adrian Moreno wrote: > There are a couple of places where the test script "sleep"s to wait for > some external condition to be met. > > This is error prone, specially in slow systems (identified in CI by > "KSFT_MACHINE_SLOW=yes"). > > To fix this, add a "ovs_wait" function that

Re: [PATCH bpf-next v2 0/2] Small API fix for bpf_wq

2024-07-08 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Mon, 08 Jul 2024 11:52:56 +0200 you wrote: > I realized this while having a map containing both a struct bpf_timer and > a struct bpf_wq: the third argument provided to the bpf_wq callback is > not the struct b

Re: [PATCH bpf-next v2 4/6] selftests/bpf: Null checks for link in bpf_tcp_ca

2024-07-08 Thread Eduard Zingerman
On Fri, 2024-07-05 at 10:38 +0800, Geliang Tang wrote: [...] I think that this patch is an improvement independent of the patch-set. Please submit it separately. > .../selftests/bpf/prog_tests/bpf_tcp_ca.c| 16 [...] > @@ -489,6 +494,7 @@ static void test_mixed_links(v

Re: [PATCH bpf-next v2 2/6] selftests/bpf: Skip ENOTSUPP in ASSERT_OK

2024-07-08 Thread Eduard Zingerman
On Mon, 2024-07-08 at 11:54 -0700, Andrii Nakryiko wrote: > On Thu, Jul 4, 2024 at 7:38 PM Geliang Tang wrote: > > > > From: Geliang Tang > > > > Just like handling ENOTSUPP in test_lsm_cgroup_functional(), this patch > > adds a new helper test_progs_get_error() to check whether the input error

Re: [PATCH bpf-next v10 06/12] selftests/bpf: Add expect_errno for network_helper_opts

2024-07-08 Thread Martin KaFai Lau
On 7/8/24 12:15 PM, Eduard Zingerman wrote: On Mon, 2024-07-08 at 10:29 +0800, Geliang Tang wrote: [...] diff --git a/tools/testing/selftests/bpf/network_helpers.h b/tools/testing/selftests/bpf/network_helpers.h index fcda6b2333ad..14d161d35248 100644 --- a/tools/testing/selftests/bpf/network

Re: [PATCH net-next v15 03/14] netdev: support binding dma-buf to netdevice

2024-07-08 Thread Mina Almasry
On Thu, Jul 4, 2024 at 10:57 AM Taehee Yoo wrote: > > I found several locking warnings while testing. > Thanks for Testing Taehee! And sorry for the late reply. I was off for a couple of days. With some minor tweaks to my test setup I was able to reproduce and fix all 3 warnings. > [ 1135.125874

Re: [PATCH bpf] selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep

2024-07-08 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann : On Fri, 5 Jul 2024 14:50:09 + you wrote: > fexit_sleep test runs successfully now on the CI so remove it from the > deny list. > > Signed-off-by: Puranjay Mohan > --- > tools/testing/selftests/bpf/DENYLIST.aar

Re: [PATCH bpf-next v10 07/12] selftests/bpf: Set expect_errno for cgroup_skb_sk_lookup

2024-07-08 Thread Martin KaFai Lau
On 7/7/24 7:29 PM, Geliang Tang wrote: From: Geliang Tang EINPROGRESS is skipped in run_lookup_test() in cgroup_skb_sk_lookup tests, but it is still showed in the log: ./test_progs -t cgroup_skb_sk_lookup -v run_cgroup_bpf_test:PASS:skel_open_load 0 nsec run_cgroup_bpf_test:PASS:cgroup_j

Re: [ovs-dev] [PATCH v1] selftests: openvswitch: retry instead of sleep

2024-07-08 Thread Adrián Moreno
On Mon, Jul 08, 2024 at 09:31:58PM GMT, Ilya Maximets wrote: > On 7/8/24 15:44, Adrian Moreno wrote: > > There are a couple of places where the test script "sleep"s to wait for > > some external condition to be met. > > > > This is error prone, specially in slow systems (identified in CI by > > "KS

[GIT PULL] Kselftest fixes for Linux 6.10

2024-07-08 Thread Shuah Khan
Hi Linus, Please pull this kselftest fixes update for Linux 6.10. This kselftest fixes update for Linux 6.10 consists of fixes to clang build failures to timerns, vDSO tests and fixes to vDSO makefile. Note: makefile fixes are included to avoid conflicts during 6.11 merge window. diff is attac

Re: [PATCH 6/6] arm: defconfig: drop RT_GROUP_SCHED=y from bcm2855/tegra/omap2plus

2024-07-08 Thread Kevin Hilman
Celeste Liu writes: > Commit 673ce00c5d6c ("ARM: omap2plus_defconfig: Add support for distros > with systemd") said it's because of recommendation from systemd. But > systemd changed their recommendation later.[1] > > For cgroup v1, if turned on, and there's any cgroup in the "cpu" hierarchy it >

RE: [PATCH net v5] skmsg: skip zero length skb in sk_msg_recvmsg

2024-07-08 Thread John Fastabend
Geliang Tang wrote: > From: Geliang Tang > > Run this BPF selftests (./test_progs -t sockmap_basic) on a Loongarch > platform, a kernel panic occurs: > > ''' > Oops[#1]: > CPU: 22 PID: 2824 Comm: test_progs Tainted: G OE 6.10.0-rc2+ #18 > Hardware name: LOONGSON Dabieshan/Loongson-TC5

[PATCH 2/2] selftests/bpf: Add uretprobe test for return_instance management

2024-07-08 Thread Liao Chang
This patch add three testcases to verify the proper management of return_instance data by uretprobes: - uretprobe_longjmp() verifies that longjmp() bypasses the uretprobe BPF program attached to the exit of instrumented function. - uretprobe_cleanup_return_instance() verifies that uretprobe rec

[PATCH 0/2] Optimize the return_instance management of uretprobe

2024-07-08 Thread Liao Chang
While exploring uretprobe syscall and trampoline for ARM64, we observed a slight performance gain for Redis benchmark using uretprobe syscall. This patchset aims to further improve the performance of uretprobe by optimizing the management of struct return_instance data. In details, uretprobe utili

[PATCH 1/2] uprobes: Optimize the return_instance related routines

2024-07-08 Thread Liao Chang
Reduce the runtime overhead for struct return_instance data managed by uretprobe. This patch replaces the dynamic allocation with statically allocated array, leverage two facts that are limited nesting depth of uretprobe (max 64) and the function call style of return_instance usage (create at entry

Re: [PATCH] kselftests: dmabuf-heaps: Ensure the driver name is null-terminated

2024-07-08 Thread Zenghui Yu
On 2024/7/9 1:49, T.J. Mercier wrote: On Mon, Jul 8, 2024 at 6:47 AM Zenghui Yu wrote: > > Even if a vgem device is configured in, we will skip the import_vgem_fd() > test almost every time. > > TAP version 13 > 1..11 > # Testing heap: system > # === >