Hi John,
On Wed, 2024-07-03 at 09:54 +0800, Geliang Tang wrote:
> On Tue, 2024-07-02 at 18:03 -0700, John Fastabend wrote:
> > Geliang Tang wrote:
> > > From: Geliang Tang
> > >
> > > Run this BPF selftests (./test_progs -t sockmap_basic) on a
> > > Loongarch
> > > platform, a Kernel panic occur
From: Geliang Tang
Use local helper make_client() instead of using make_socket() and
connect(). Then make_socket() and inetaddr_len() can be dropped now.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 45 +--
1 file changed, 2 insertions(+), 43
From: Geliang Tang
Use public network helpers make_sockaddr() and connect_to_addr() instead
of using the local defined function make_socket() and connect().
This make_socket() can be dropped latter.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 22 ---
From: Geliang Tang
This patch uses public helper connect_to_fd_opts() exported in
network_helpers.h instead of using make_socket() and connect() in
prog_tests/sk_lookup.c. This can simplify the code.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 25 +++
From: Geliang Tang
This patch uses public helper start_server_addr() instead of local
defined function make_server() in prog_tests/sk_lookup.c to avoid
duplicate code.
Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set
it to setsockopt pointer of struct network_helper_opts, and pas
From: Geliang Tang
This patch uses public helper make_sockaddr() exported in network_helpers.h
instead of open-coding in sockmap_ktls.c. This can avoid duplicate code.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c | 16 ++--
From: Geliang Tang
Server 1 fd should be closed in the error path when update_lookup_map()
fails. This patch fixes it by goto "close_srv1" instead of "detach"
lable in that case.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2
From: Geliang Tang
Use public network helper connect_to_fd_opts() instead of open-coding it
in prog_tests/sockmap_ktls.c. This can avoid duplicate code.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c| 14 ++
1 file ch
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 avoid duplicate code.
Technically, this is not a one-for-one replacement, as start_server_str()
also does bind(). But t
From: Geliang Tang
Some callers expect __start_server() helper to pass their own "backlog"
value to listen() instead of the default of 1. So this patch adds struct
member "backlog" for network_helper_opts to allow callers to set "backlog"
value via start_server_str() helper.
listen(fd, 0 /* back
From: Geliang Tang
v8:
- only patch 8 updated, to fix errors reported by CI.
v7:
- address Martin's comments in v6. (thanks)
- use MAX(opts->backlog, 0) instead of opts->backlog.
- use connect_to_fd_opts instead connect_to_fd.
- more ASSERT_* to check errors.
v6:
- update patch 6 as Danie
On Thu, 2024-06-27 at 10:42 -0700, Sean Christopherson wrote:
> On Fri, Jun 21, 2024, Maxim Levitsky wrote:
> > Currently this test does a single CLFLUSH on its memory location
> > but due to speculative execution this might not cause LLC misses.
> >
> > Instead, do a cache flush on each loop iter
On Thu, 2024-07-04 at 14:48 +0800, Geliang Tang wrote:
> From: Geliang Tang
>
> BPF selftests seem to have not been fully tested on Loongarch
> platforms.
> There are so many "ENOTSUPP" (-524) errors when running BPF selftests
> on
> them since lacking BPF trampoline on Loongarch.
>
> For these
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:skel_open 0 nsec
#17/1bpf_cookie/kprobe:OK
#17/2bpf_cookie/mu
From: Geliang Tang
Although the "Segmentation fault" errors are fixed in the last commit,
run bpf_tcp_ca selftests (./test_progs -t bpf_tcp_ca) on a Loongarch
platform, still some other "ENOTSUPP" (-524) errors left since lacking
BPF trampoline on Loongarch:
'''
test_dctcp:PASS:bpf_dctcp__open_
From: Geliang Tang
Run bpf_tcp_ca selftests (./test_progs -t bpf_tcp_ca) on a Loongarch
platform, some "Segmentation fault" errors occur:
'''
test_dctcp:PASS:bpf_dctcp__open_and_load 0 nsec
test_dctcp:FAIL:bpf_map__attach_struct_ops unexpected error: -524
#29/1bpf_tcp_ca/dctcp:FAIL
test_
From: Geliang Tang
There are so many "ENOTSUPP" (-524) errors when running BPF selftests
on a Loongarch platform since lacking BPF trampoline on Loongarch:
'''
test_d_path_basic:PASS:setup 0 nsec
libbpf: prog 'prog_stat': failed to attach: unknown error (-524)
libbpf: prog 'prog_stat': failed
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 skip
the test instead of using test__fail().
Use this helper in
From: Geliang Tang
ENOTSUPP are defined in so many places in bpf selftests, this patch
moves this definition into testing_helpers.h, which is almost included
by each tests. And drop all other duplicate definitions.
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/prog_tests/bpf_tcp_
From: Geliang Tang
v2:
- Although all CI tests passed on x86_64 "bpf/vmtest-bpf-next-VM_Test-22
Logs for x86_64-gcc / test (test_progs, false, 360) / test_progs on x86_64
with gcc", some unexpect "SKIP"s are showed in the log:
#29/1bpf_tcp_ca/dctcp:SKIP
#29/2bpf_tcp_ca/cubic:OK
#2
On Thu, 2024-07-04 at 16:59 +0800, Geliang Tang wrote:
> From: Geliang Tang
>
> Use public network helpers make_sockaddr() and connect_to_addr()
> instead
> of using the local defined function make_socket() and connect().
>
> This make_socket() can be dropped latter.
>
> Signed-off-by: Geliang
The pull request you sent on Thu, 4 Jul 2024 14:38:16 +0200:
> https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git
> tags/kselftest-fix-2024-07-04
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/4d85acef10252c59e3b6c197c61d9252ff950431
Thank you!
--
Deet-
On Wed, Jul 03, 2024 at 08:04:52PM -0700, John Hubbard wrote:
> Current practice in the selftests Makefiles is to use $(LLVM) as a way
> to decide if clang is being used as the compiler (and/or the linker
> front end). Unfortunately, this does not cover all of the use cases:
>
> 1) CC could have b
On Thu, Jul 4, 2024 at 7:33 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 arguments are
On Fri, Jun 28, 2024 at 9:43 AM Mina Almasry wrote:
>
Hi Mina,
> Add a netdev_dmabuf_binding struct which represents the
> dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
> rx queues on the netdevice. On the binding, the dma_buf_attach
> & dma_buf_map_attachment will occur
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 arguments are passed on the stack, with SP pointing to the
first stacked argu
On Fri, Jun 28, 2024 at 9:43 AM Mina Almasry wrote:
>
Hi Mina,
Thanks a lot for this work!
> Add a netdev_dmabuf_binding struct which represents the
> dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
> rx queues on the netdevice. On the binding, the dma_buf_attach
> & dma_b
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt :
On Tue, 02 Jul 2024 18:54:48 -0700 you wrote:
> Clang does not support implicit LMUL in the vset* instruction sequences.
> Introduce an explicit LMUL in the vsetivli instruction.
>
> Signed-off-by: Charlie Jenkins
> Fi
Hi Linus,
This PR fixes a few kselftests [1]. This has been in linux-next for a week and
rebased to add Mark Brown's Tested-by. The race condition found while writing
this fix is not new and seems specific to UML's hostfs (I also tested against
ext4 and btrfs without being able to trigger this i
On Fri, 2024-06-21 at 22:14 +0200, Roman Kagan wrote:
>
> Compared to the approach used in the orignal series, where a dedicated kernel
> address range and thus a dedicated PGD was used for mm-local allocations, the
> one proposed here may have certain drawbacks, in particular
>
> - using user ad
Hello,
@BPF people: this new tool doesn't compile on the BPF CI [1]. Can I have
a hand to find the best way to fix this please? (see below)
[1] https://github.com/kernel-patches/bpf/pull/7296
On 03/07/2024 20:57, Matthieu Baerts (NGI0) wrote:
> From: Geliang Tang
>
> This patch adds a symlink
On 04/07/2024 04:04, John Hubbard wrote:
> Current practice in the selftests Makefiles is to use $(LLVM) as a way
> to decide if clang is being used as the compiler (and/or the linker
> front end). Unfortunately, this does not cover all of the use cases:
>
> 1) CC could have been set within selfte
From: Geliang Tang
Use local helper make_client() instead of using make_socket() and
connect(). Then make_socket() and inetaddr_len() can be dropped now.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 45 +--
1 file changed, 2 insertions(+), 43
From: Geliang Tang
Use public network helpers make_sockaddr() and connect_to_addr() instead
of using the local defined function make_socket() and connect().
This make_socket() can be dropped latter.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 20 +--
From: Geliang Tang
This patch uses public helper connect_to_fd_opts() exported in
network_helpers.h instead of using make_socket() and connect() in
prog_tests/sk_lookup.c. This can simplify the code.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 25 +++
From: Geliang Tang
This patch uses public helper start_server_addr() instead of local
defined function make_server() in prog_tests/sk_lookup.c to avoid
duplicate code.
Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set
it to setsockopt pointer of struct network_helper_opts, and pas
From: Geliang Tang
Server 1 fd should be closed in the error path when update_lookup_map()
fails. This patch fixes it by goto "close_srv1" instead of "detach"
lable in that case.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2
From: Geliang Tang
This patch uses public helper make_sockaddr() exported in network_helpers.h
instead of open-coding in sockmap_ktls.c. This can avoid duplicate code.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c | 16 ++--
From: Geliang Tang
Use public network helper connect_to_fd_opts() instead of open-coding it
in prog_tests/sockmap_ktls.c. This can avoid duplicate code.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c| 14 ++
1 file ch
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 avoid duplicate code.
Technically, this is not a one-for-one replacement, as start_server_str()
also does bind(). But t
From: Geliang Tang
Some callers expect __start_server() helper to pass their own "backlog"
value to listen() instead of the default of 1. So this patch adds struct
member "backlog" for network_helper_opts to allow callers to set "backlog"
value via start_server_str() helper.
listen(fd, 0 /* back
From: Geliang Tang
v7:
- address Martin's comments in v6. (thanks)
- use MAX(opts->backlog, 0) instead of opts->backlog.
- use connect_to_fd_opts instead connect_to_fd.
- more ASSERT_* to check errors.
v6:
- update patch 6 as Daniel suggested. (thanks)
v5:
- keep make_server and make_clie
Add a test to verify sampling packets via psample works.
In order to do that, create a subcommand in ovs-dpctl.py to listen to
on the psample multicast group and print samples.
Reviewed-by: Aaron Conole
Tested-by: Ilya Maximets
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/op
The trunc action was supported decode-able but not parse-able. Add
support for parsing the action string.
Reviewed-by: Aaron Conole
Signed-off-by: Adrian Moreno
---
.../testing/selftests/net/openvswitch/ovs-dpctl.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testi
The userspace action lacks parsing support plus it contains a bug in the
name of one of its attributes.
This patch makes userspace action work.
Reviewed-by: Aaron Conole
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/ovs-dpctl.py| 24 +--
1 file changed, 22
Add sample and psample action support to ovs-dpctl.py.
Refactor common attribute parsing logic into an external function.
Reviewed-by: Aaron Conole
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/ovs-dpctl.py| 162 +-
1 file changed, 161 insertions(+), 1 dele
** Background **
Currently, OVS supports several packet sampling mechanisms (sFlow,
per-bridge IPFIX, per-flow IPFIX). These end up being translated into a
userspace action that needs to be handled by ovs-vswitchd's handler
threads only to be forwarded to some third party application that
will some
On Fri, Jun 28, 2024 at 9:38 AM Mina Almasry wrote:
>
Hi Mina,
Thank you so much for this work!
> ncdevmem is a devmem TCP netcat. It works similarly to netcat, but it
> sends and receives data using the devmem TCP APIs. It uses udmabuf as
> the dmabuf provider. It is compatible with a regular n
On Wed, Jul 03, 2024 at 07:35:19PM GMT, Jakub Kicinski wrote:
> On Tue, 2 Jul 2024 11:53:17 +0200 Adrian Moreno wrote:
> > selftests: openvswitch: add psample action
> > selftests: openvswitch: add userspace parsing
> > selftests: openvswitch: parse trunc action
> > selftests: openvswitch:
These warnings are all of the form, "the format specified a short
(signed or unsigned) int, but the value is a full length int".
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/sigreturn.c | 2 +-
tools/testing/selftests/x86/test_vsyscall.c | 10 +
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...quite a few functions are variables are generating "unused" warnings.
Fix the warnings by deleting the unused items.
One item, the "nerrs" variable in vsdo_restorer.c's main(), is unused
but probably wants to be returne
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang warns that -no-pie is "unused during compilation".
This occurs because clang only wants to see -no-pie during linking.
Here, we don't have a separate linking stage, so a compiler warning is
unavoidable without (wa
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...the following build failure occurs in selftests/x86:
clang: error: cannot specify -o when generating multiple output files
This happens because, although gcc doesn't complain if you invoke it
like this:
gcc fil
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...the build fails because clang's inline asm doesn't support all of the
features that are used in the asm() snippet in sysret_rip.c.
Fix this by moving the asm code into the clang_helpers_64.S file, where
it can be built
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
Fix this by moving the inline asm to "pure" assembly, in two new files:
clang_helpers_32.S, clang_helpers_64.S.
As a bonus, the pure asm avoids the need for ifdefs, and is now very
simple and easy on the eyes.
Acked-by: M
From: Muhammad Usama Anjum
Use fisttps instead of fisttp to specify correctly that the output
variable is of size short.
test_FISTTP.c:28:3: error: ambiguous instructions require an explicit suffix
(could be 'fisttps', or 'fisttpl')
28 | " fisttp res16""\n"
| ^
Changes since v3:
1) Rebased onto Linux 6.10-rc6+.
2) Added Muhammad's acks for the series.
Cover letter for v3:
Hi,
Dave Hansen, Muhammad Usama Anjum, here is the combined series that we
discussed yesterday [1].
As I mentioned then, this is a bit intrusive--but no more than
necessary, IMHO.
Hi Reinette,
On 2024-07-03 at 13:51:03 -0700, Reinette Chatre wrote:
>Hi Maciej,
>
>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:
>
>> > > diff --git a/tools/testing/selftests/resctrl/cache.c
>>
58 matches
Mail list logo