Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Hangbin Liu
On Fri, Nov 24, 2023 at 03:35:51PM +0100, Petr Machata wrote: > > Hangbin Liu writes: > > > +cleanup_ns() > > +{ > > + local ns="" > > + local errexit=0 > > + > > + # disable errexit temporary > > + if [[ $- =~ "e" ]]; then > > + errexit=1 > > + set +e > > + fi > >

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Hangbin Liu
On Fri, Nov 24, 2023 at 03:05:18PM +0100, Petr Machata wrote: > > Hangbin Liu writes: > > > Add a lib.sh for net selftests. This file can be used to define commonly > > used variables and functions. > > > > Add function setup_ns() for user to create unique namespaces with given > > prefix name.

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Guo Ren
On Fri, Nov 24, 2023 at 11:15:19AM +0100, Peter Zijlstra wrote: > On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > > From: Christoph Müllner > > > > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg > > CSR to switch the memory consistency model at run-

Re: [PATCH 0/5] pstore: add tty frontend and multi-backend

2023-11-24 Thread Guilherme G. Piccoli
Hi Yuanhe / Kees. My apologies (and embarrassment) for responding almost 2mo later... On 29/09/2023 00:49, Kees Cook wrote: > [...] >> Another problem is that currently pstore only supports a single backend. >> For debugging kdump problems, we hope to save the console logs and tty >> logs to the

Re: [PATCH ipsec-next v1 7/7] bpf: xfrm: Add selftest for bpf_xdp_get_xfrm_state()

2023-11-24 Thread Daniel Xu
Hi Alexei, On Wed, Nov 22, 2023 at 03:28:16PM -0800, Alexei Starovoitov wrote: > On Wed, Nov 22, 2023 at 10:21 AM Daniel Xu wrote: > > > > + > > + bpf_printk("replay-window %d\n", x->replay_esn->replay_window); > > Pls no printk in tests. Find a different way to validate. Ack. I'll migrat

Re: [PATCH v1 1/3] KVM: selftests: aarch64: Make the [create|destroy]_vpmu_vm() can be reused

2023-11-24 Thread Eric Auger
Hi Shaoqin, On 11/23/23 07:37, Shaoqin Huang wrote: > Move the [create|destroy]_vpmu_vm() into the lib/, which makes those some wording suggestions below: Move the implementation of .. into lib/aarch64/pmu.c and export their declaration in a header so that they can be reused by other tests. Also

Re: [PATCH v1 2/3] KVM: selftests: aarch64: Move the pmu helper function into lib/

2023-11-24 Thread Eric Auger
Hi Shaoqin, On 11/23/23 07:37, Shaoqin Huang wrote: > Move those pmu helper function into lib/, thus it can be used by other functions Not really into lib but rather in vpmu.h header. > pmu test. no functional change intended > > Signed-off-by: Shaoqin Huang > --- > .../kvm/aarch64/vpmu_count

Re: [PATCH v3 18/25] arm64/ptrace: add support for FEAT_POE

2023-11-24 Thread Mark Brown
On Fri, Nov 24, 2023 at 04:35:03PM +, Joey Gouly wrote: > Add a regset for POE containing POR_EL0. > +++ b/include/uapi/linux/elf.h > @@ -440,6 +440,7 @@ typedef struct elf64_shdr { > #define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers */ > #define NT_ARM_ZA0x40c

[PATCH net 2/4] selftests/net: fix a char signedness issue

2023-11-24 Thread Willem de Bruijn
From: Willem de Bruijn Signedness of char is signed on x86_64, but unsigned on arm64. Fix the warning building cmsg_sender.c on signed platforms or forced with -fsigned-char: msg_sender.c:455:12: error: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-We

[PATCH net 4/4] selftests/net: mptcp: fix uninitialized variable warnings

2023-11-24 Thread Willem de Bruijn
From: Willem de Bruijn Same init_rng() in both tests. The function reads /dev/urandom to initialize srand(). In case of failure, it falls back onto the entropy in the uninitialized variable. Not sure if this is on purpose. But failure reading urandom should be rare, so just fail hard. While at it

[PATCH net 3/4] selftests/net: unix: fix unused variable compiler warning

2023-11-24 Thread Willem de Bruijn
From: Willem de Bruijn Remove an unused variable. diag_uid.c:151:24: error: unused variable 'udr' [-Werror,-Wunused-variable] Fixes: ac011361bd4f ("af_unix: Add test for sock_diag and UDIAG_SHOW_UID.") Signed-off-by: Willem de Bruijn --- tools/testing/selftests/net/af_unix/diag_ui

[PATCH net 1/4] selftests/net: ipsec: fix constant out of range

2023-11-24 Thread Willem de Bruijn
From: Willem de Bruijn Fix a small compiler warning. nr_process must be a signed long: it is assigned a signed long by strtol() and is compared against LONG_MIN and LONG_MAX. ipsec.c:2280:65: error: result of comparison of constant -9223372036854775808 with expression of type 'unsigned

[PATCH net 0/4] selftests/net: fix a few small compiler warnings

2023-11-24 Thread Willem de Bruijn
From: Willem de Bruijn Observed a clang warning when backporting cmsg_sender. Ran the same build against all the .c files under selftests/net. This is clang-14 with -Wall Which is what tools/testing/selftests/net/Makefile also enables. Willem de Bruijn (4): selftests/net: ipsec: fix constant

Re: [PATCH v3 19/25] kselftest/arm64: move get_header()

2023-11-24 Thread Mark Brown
On Fri, Nov 24, 2023 at 04:35:04PM +, Joey Gouly wrote: > Put this function in the header so that it can be used by other tests, without > needing to link to testcases.c. It would've been good to explain a bit more of the context here but Reviewed-by: Mark Brown signature.asc Description:

Re: [PATCH v3 25/25] KVM: selftests: get-reg-list: add Permission Overlay registers

2023-11-24 Thread Mark Brown
On Fri, Nov 24, 2023 at 04:35:10PM +, Joey Gouly wrote: > Add new system registers: > - POR_EL1 > - POR_EL0 Reviewed-by: Mark Brown signature.asc Description: PGP signature

Re: [PATCH v3 24/25] kselftest/arm64: Add test case for POR_EL0 signal frame records

2023-11-24 Thread Mark Brown
On Fri, Nov 24, 2023 at 04:35:09PM +, Joey Gouly wrote: > +++ b/tools/testing/selftests/arm64/signal/.gitignore > @@ -5,6 +5,7 @@ sme_* > ssve_* > sve_* > tpidr2_* > +poe_siginfo > za_* > zt_* > !*.[ch] Please keep this sorted, otherwise Reviewed-by: Mark Brown signature.asc Descrip

Re: [PATCH v3 22/25] kselftest/arm64: add HWCAP test for FEAT_S1POE

2023-11-24 Thread Mark Brown
On Fri, Nov 24, 2023 at 04:35:07PM +, Joey Gouly wrote: > Check that when POE is enabled, the POR_EL0 register is accessible. Reviewed-by: Mark Brown signature.asc Description: PGP signature

[PATCH v3 25/25] KVM: selftests: get-reg-list: add Permission Overlay registers

2023-11-24 Thread Joey Gouly
Add new system registers: - POR_EL1 - POR_EL0 Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Oliver Upton Cc: Shuah Khan --- tools/testing/selftests/kvm/aarch64/get-reg-list.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/t

[PATCH v3 23/25] kselftest/arm64: parse POE_MAGIC in a signal frame

2023-11-24 Thread Joey Gouly
Teach the signal frame parsing about the new POE frame, avoids warning when it is generated. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Shuah Khan Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/signal/testcases/testcases.c | 4 1 file ch

[PATCH v3 21/25] selftests: mm: make protection_keys test work on arm64

2023-11-24 Thread Joey Gouly
The encoding of the pkey register differs on arm64, than on x86/ppc. On those platforms, a bit in the register is used to disable permissions, for arm64, a bit enabled in the register indicates that the permission is allowed. This drops two asserts of the form: assert(read_pkey_reg() <= o

[PATCH v3 24/25] kselftest/arm64: Add test case for POR_EL0 signal frame records

2023-11-24 Thread Joey Gouly
Ensure that we get signal context for POR_EL0 if and only if POE is present on the system. Copied from the TPIDR2 test. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Shuah Khan --- .../testing/selftests/arm64/signal/.gitignore | 1 + .../arm64/signal/test

[PATCH v3 22/25] kselftest/arm64: add HWCAP test for FEAT_S1POE

2023-11-24 Thread Joey Gouly
Check that when POE is enabled, the POR_EL0 register is accessible. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Shuah Khan --- tools/testing/selftests/arm64/abi/hwcap.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/testing/self

[PATCH v3 20/25] selftests: mm: move fpregs printing

2023-11-24 Thread Joey Gouly
arm64's fpregs are not at a constant offset from sigcontext. Since this is not an important part of the test, don't print the fpregs pointer on arm64. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Cc: Shuah Khan Cc: Dave Hansen Cc: Aneesh Kumar K.V Acked-by

[PATCH v3 19/25] kselftest/arm64: move get_header()

2023-11-24 Thread Joey Gouly
Put this function in the header so that it can be used by other tests, without needing to link to testcases.c. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Cc: Shuah Khan Cc: Dave Hansen Cc: Aneesh Kumar K.V --- .../arm64/signal/testcases/testcases.c

[PATCH v3 16/25] arm64: enable PKEY support for CPUs with S1POE

2023-11-24 Thread Joey Gouly
Now that PKEYs support has been implemented, enable it for CPUs that support S1POE. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pkeys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pkeys.h b/arch/arm64/i

[PATCH v3 18/25] arm64/ptrace: add support for FEAT_POE

2023-11-24 Thread Joey Gouly
Add a regset for POE containing POR_EL0. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/ptrace.c | 46 ++ include/uapi/linux/elf.h | 1 + 2 files changed, 47 insertions(+) diff --git a/arch/arm64/kernel/ptrace.c b/arc

[PATCH v3 15/25] arm64: add POE signal support

2023-11-24 Thread Joey Gouly
Add PKEY support to signals, by saving and restoring POR_EL0 from the stackframe. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Mark Brown --- arch/arm64/include/uapi/asm/sigcontext.h | 7 arch/arm64/kernel/signal.c | 51 ++

[PATCH v3 17/25] arm64: enable POE and PIE to coexist

2023-11-24 Thread Joey Gouly
Set the EL0/userspace indirection encodings to be the overlay enabled variants of the permissions. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pgtable-prot.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/incl

[PATCH v3 14/25] arm64: implement PKEYS support

2023-11-24 Thread Joey Gouly
Implement the PKEYS interface, using the Permission Overlay Extension. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/mmu.h | 2 + arch/arm64/include/asm/mmu_context.h | 32 - arch/arm64/include/asm/pgtable.h | 23 +- a

[PATCH v3 13/25] arm64: stop using generic mm_hooks.h

2023-11-24 Thread Joey Gouly
These functions will be extended to support pkeys. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/mmu_context.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64

[PATCH v3 12/25] arm64: handle PKEY/POE faults

2023-11-24 Thread Joey Gouly
If a memory fault occurs that is due to an overlay/pkey fault, report that to userspace with a SEGV_PKUERR. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/traps.h | 1 + arch/arm64/kernel/traps.c | 12 -- arch/arm64/mm/fault.c |

[PATCH v3 11/25] arm64: enable ARCH_HAS_PKEYS on arm64

2023-11-24 Thread Joey Gouly
Enable the ARCH_HAS_PKEYS config, but provide dummy functions for the entire interface. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 2 ++ arch/arm64/include/asm/pkeys.h | 54 ++ arch/arm64/mm/mmu.c

[PATCH v3 09/25] arm64: define VM_PKEY_BIT* for arm64

2023-11-24 Thread Joey Gouly
Define the VM_PKEY_BIT* values for arm64, and convert them into the arm64 specific pgprot values. Move the current values for x86 and PPC into arch/*. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/mman.h | 8 +++- arch/arm64/include/asm/page.h

[PATCH v3 10/25] arm64: mask out POIndex when modifying a PTE

2023-11-24 Thread Joey Gouly
When a PTE is modified, the POIndex must be masked off so that it can be modified. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/a

[PATCH v3 08/25] arm64: add POIndex defines

2023-11-24 Thread Joey Gouly
The 3-bit POIndex is stored in the PTE at bits 60..62. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pgtable-hwdef.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtab

[PATCH v3 06/25] KVM: arm64: Save/restore POE registers

2023-11-24 Thread Joey Gouly
Define the new system registers that POE introduces and context switch them. Signed-off-by: Joey Gouly Cc: Marc Zyngier Cc: Oliver Upton Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/kvm_arm.h | 4 ++-- arch/arm64/include/asm/kvm_host.h | 4 arch/ar

[PATCH v3 05/25] arm64: context switch POR_EL0 register

2023-11-24 Thread Joey Gouly
POR_EL0 is a register that can be modified by userspace directly, so it must be context switched. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/cpufeature.h | 6 ++ arch/arm64/include/asm/processor.h | 1 + arch/arm64/include/asm/sysreg.h |

[PATCH v3 07/25] arm64: enable the Permission Overlay Extension for EL0

2023-11-24 Thread Joey Gouly
Expose a HWCAP and ID_AA64MMFR3_EL1_S1POE to userspace, so they can be used to check if the CPU supports the feature. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- Documentation/arch/arm64/elf_hwcaps.rst | 3 +++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/i

[PATCH v3 04/25] arm64: disable trapping of POR_EL0 to EL2

2023-11-24 Thread Joey Gouly
Allow EL0 or EL1 to access POR_EL0 without being trapped to EL2. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/el2_setup.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/i

[PATCH v3 02/25] arm64/sysreg: update CPACR_EL1 register

2023-11-24 Thread Joey Gouly
Add E0POE bit that traps accesses to POR_EL0 from EL0. Updated according to DDI0601 2023-03. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Mark Brown --- arch/arm64/tools/sysreg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/tools

[PATCH v3 03/25] arm64: cpufeature: add Permission Overlay Extension cpucap

2023-11-24 Thread Joey Gouly
This indicates if the system supports POE. This is a CPUCAP_BOOT_CPU_FEATURE as the boot CPU will enable POE if it has it, so secondary CPUs must also have this feature. Add a new config option: ARM64_POE Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig

[PATCH v3 00/25] Permission Overlay Extension

2023-11-24 Thread Joey Gouly
Hello everyone, This series implements the Permission Overlay Extension introduced in 2022 VMSA enhancements [1]. It is based on v6.7-rc2. Changes since v2[2]: # Added ptrace support and selftest # Add missing POR_EL0 initialisation in fork/clone # Rebase onto v6.7-rc2

[PATCH v3 01/25] arm64/sysreg: add system register POR_EL{0,1}

2023-11-24 Thread Joey Gouly
Add POR_EL{0,1} according to DDI0601 2023-03. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 13 + arch/arm64/tools/sysreg | 12 2 files changed, 25 insertions(+) diff --git a/arch/a

Re: [RFC PATCH 0/2] Add a test to verify device probing on ACPI platforms

2023-11-24 Thread Laura Nao
On 11/23/23 16:14, Dan Carpenter wrote: > On Thu, Nov 23, 2023 at 01:09:42PM +0100, Laura Nao wrote: >>> Your talk was interesting at Linux Plumbers. >>> >>> https://www.youtube.com/watch?v=oE73eVSyFXQ [time +2:35] >>> >>> This is probably a stupid question, but why not just add something to >>> ca

[PATCH net-next 5/5] selftests: tc-testing: remove unused import

2023-11-24 Thread Pedro Tammela
Remove this leftover from the times we pre-allocated everything Signed-off-by: Pedro Tammela --- tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py b/tools/testing/selftests/tc-

[PATCH net-next 4/5] selftests: tc-testing: cleanup on Ctrl-C

2023-11-24 Thread Pedro Tammela
Cleanup net namespaces and other resources if we get a SIGINT (Ctrl-C). As user visible resources are allocated on a per test basis, it's only required to catch this condition when (possibly) running tests. So far calling post_suite is enough to free up anything that might linger. A missing keywo

[PATCH net-next 3/5] selftests: tc-testing: prefix iproute2 functions with "ipr2"

2023-11-24 Thread Pedro Tammela
As suggested by Simon, prefix the functions that operate on iproute2 commands in contrast with the "nl" netlink prefix. Cc: Simon Horman Signed-off-by: Pedro Tammela --- .../selftests/tc-testing/plugin-lib/nsPlugin.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH net-next 2/5] selftests: tc-testing: remove unnecessary time.sleep

2023-11-24 Thread Pedro Tammela
This operation is redundant and it's not stabilizing nor waiting for anything. Signed-off-by: Pedro Tammela --- tools/testing/selftests/tc-testing/tdc.py | 5 - 1 file changed, 5 deletions(-) diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py

[PATCH net-next 1/5] selftests: tc-testing: remove buildebpf plugin

2023-11-24 Thread Pedro Tammela
As tdc only tests loading/deleting and anything more complicated is better left to the ebpf test suite, provide a pre-compiled version of 'action.c' and don't bother compiling it in kselftests or on the fly at all. Cc: Davide Caratti Signed-off-by: Pedro Tammela --- tools/testing/selftests/tc-t

[PATCH net-next 0/5] selftests: tc-testing: updates and cleanups for tdc

2023-11-24 Thread Pedro Tammela
Address the recommendations from the previous series and cleanup some leftovers. Pedro Tammela (5): selftests: tc-testing: remove buildebpf plugin selftests: tc-testing: remove unnecessary time.sleep selftests: tc-testing: prefix iproute2 functions with "ipr2" selftests: tc-testing: cleanu

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Petr Machata
Petr Machata writes: > Hangbin Liu writes: > >> +# By default, remove all netns before EXIT. >> +cleanup_all_ns() >> +{ >> +cleanup_ns $NS_LIST >> +} >> +trap cleanup_all_ns EXIT > > Hmm, OK, this is a showstopper for inclusion from forwarding/lib.sh, > because basically all users of forwa

[PATCH] kselftest/arm64: Improve output for skipped TPIDR2 ABI test

2023-11-24 Thread Mark Brown
ip_test(default_value); + skip_test(write_read); + skip_test(write_sleep_read); + skip_test(write_fork_read); + skip_test(write_clone_read); } print_summary(); --- base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263 change-id: 20231124-kselftest-arm64-tpidr2-skip-43764f4ff4f4 Best regards, -- Mark Brown

Re: [PATCH] kselftest/clone3: Make test names for set_tid test stable

2023-11-24 Thread Christian Brauner
On Wed, Nov 15, 2023 at 02:43:02PM +, Mark Brown wrote: > The test results reported for the clone3_set_tid tests interact poorly with > automation for running kselftest since the reported test names include TIDs > dynamically allocated at runtime. A lot of automation for running kselftest > wil

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Petr Machata
Hangbin Liu writes: > +cleanup_ns() > +{ > + local ns="" > + local errexit=0 > + > + # disable errexit temporary > + if [[ $- =~ "e" ]]; then > + errexit=1 > + set +e > + fi > + > + for ns in "$@"; do > + ip netns delete "${ns}" &> /de

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Petr Machata
Hangbin Liu writes: > Add a lib.sh for net selftests. This file can be used to define commonly > used variables and functions. > > Add function setup_ns() for user to create unique namespaces with given > prefix name. > > Signed-off-by: Hangbin Liu > --- > tools/testing/selftests/net/Makefile

Re: [PATCH v7 1/3] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2023-11-24 Thread Jason Gunthorpe
On Fri, Nov 24, 2023 at 03:00:45AM +, Tian, Kevin wrote: > > I'm fully expecting that Intel will adopt an direct-DMA flush queue > > like SMMU and AMD have already done as a performance optimization. In > > this world it makes no sense that the behavior of the direct DMA queue > > and driver m

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Michael Ellerman
Peter Zijlstra writes: > On Fri, Nov 24, 2023 at 12:04:09PM +0100, Jonas Oberhauser wrote: > >> > I think ARM64 approached this problem by adding the >> > load-acquire/store-release instructions and for TSO based code, >> > translate into those (eg. x86 -> arm64 transpilers). >> >> >> Although t

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Peter Zijlstra
On Fri, Nov 24, 2023 at 12:04:09PM +0100, Jonas Oberhauser wrote: > > I think ARM64 approached this problem by adding the > > load-acquire/store-release instructions and for TSO based code, > > translate into those (eg. x86 -> arm64 transpilers). > > > Although those instructions have a bit more

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Peter Zijlstra
On Fri, Nov 24, 2023 at 11:53:06AM +0100, Christoph Müllner wrote: > > I think ARM64 approached this problem by adding the > > load-acquire/store-release instructions and for TSO based code, > > translate into those (eg. x86 -> arm64 transpilers). > > > > IIRC Risc-V actually has such instructions

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Christoph Müllner
On Fri, Nov 24, 2023 at 11:15 AM Peter Zijlstra wrote: > > On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > > From: Christoph Müllner > > > > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg > > CSR to switch the memory consistency model at run-time fr

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-24 Thread Peter Zijlstra
On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > From: Christoph Müllner > > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg > CSR to switch the memory consistency model at run-time from RVWMO to TSO > (and back). The active consistency model can ther

Re: [PATCH 0/5] tools: selftests: riscv: Fix compiler warnings

2023-11-24 Thread Andrew Jones
On Thu, Nov 23, 2023 at 07:58:16PM +0100, Christoph Muellner wrote: > From: Christoph Müllner > > When building the RISC-V selftests with a riscv32 compiler I ran into > a couple of compiler warnings. While riscv32 support for these tests is > questionable, the fixes are so trivial that it is pro

[PATCH net-next 38/38] kselftest/runner.sh: add netns support

2023-11-24 Thread Hangbin Liu
Add a variable RUN_IN_NETNS if user want to run all the test in name space in parallel. With this, we can save a lot of testing time. Nit: the NUM in run_one is not used, rename it to test_num. Signed-off-by: Hangbin Liu --- tools/testing/selftests/kselftest/runner.sh | 26 +++--

[PATCH net-next 37/38] selftests/net: convert xfrm_policy.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./xfrm_policy.sh PASS: policy before exception matches PASS: ping to .254 bypassed ipsec tunnel (exceptions) PASS: direct policy matches (exceptions) PASS: policy matches (exceptions) PASS: ping to .254 bypassed ipsec tunnel (exceptions and block polici

[PATCH net-next 36/38] selftests/net: convert traceroute.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./traceroute.sh TEST: IPV6 traceroute [ OK ] TEST: IPV4 traceroute [ OK ] Tests passed: 2 Tests failed: 0 Signed-off-by: Hangbin Liu --- tools/testing/se

[PATCH net-next 35/38] selftests/net: convert vrf-xfrm-tests.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./vrf-xfrm-tests.sh No qdisc on VRF device TEST: IPv4 no xfrm policy [ OK ] TEST: IPv6 no xfrm policy [ OK ] TEST: IPv4 xfrm policy based on address

[PATCH net-next 34/38] selftests/net: convert vrf_strict_mode_test.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./vrf_strict_mode_test.sh TEST SECTION: VRF strict_mode test on init network namespace ##

[PATCH net-next 33/38] selftests/net: convert vrf_route_leaking.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./vrf_route_leaking.sh ### IPv4 (sym route): VRF ICMP ttl error route lookup ping ### TEST: Basic IPv4

[PATCH net-next 32/38] selftests/net: convert unicast_extensions.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. # ./unicast_extensions.sh /usr/bin/which: no nettest in (/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin) ### Unicast address e

[PATCH net-next 31/38] selftests/net: convert toeplitz.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
I have no valid NIC for testing, but the result looks good. ]# ./toeplitz.sh -i eno1 -t -6 carrier ready count: pass=0 nohash=0 fail=0 ./toeplitz: too few frames for verification setup_loopback.sh: line 68: 902542 Killed ip netns exec $client_ns ./toeplitz_client.sh "${PROTO_FLAG

[PATCH net-next 30/38] selftests/net: convert test_vxlan_vnifiltering.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./test_vxlan_vnifiltering.sh TEST: Create traditional vxlan device [ OK ] TEST: Cannot create vnifilter device without external flag [ OK ] TEST: Creating external vxlan device with vnifilter flag

[PATCH net-next 29/38] selftests/net: convert test_vxlan_under_vrf.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./test_vxlan_under_vrf.sh Checking HV connectivity [ OK ] Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ] Check VM connectivity through VXLAN (underlay in a VRF)[ OK ] Sign

[PATCH net-next 28/38] selftests/net: convert test_vxlan_nolocalbypass.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./test_vxlan_nolocalbypass.sh TEST: localbypass enabled [ OK ] TEST: Packet received by local VXLAN device - localbypass [ OK ] TEST: localbypass disabled [ OK

[PATCH net-next 27/38] selftests/net: convert test_vxlan_mdb.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./test_vxlan_mdb.sh Control path: Basic (*, G) operations - IPv4 overlay / IPv4 underlay TEST: MDB entry addition[ OK ] ... Data path: MD

[PATCH net-next 26/38] selftests/net: convert test_bridge_neigh_suppress.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./test_bridge_neigh_suppress.sh declare -- sip="192.0.2.1" declare -- tip="192.0.2.2" declare -- vid="10" Per-port ARP suppression - VLAN 10 -- TEST: arping[ OK ] T

[PATCH net-next 25/38] selftests/net: convert test_bridge_backup_port.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
There is no h1 h2 actually. Remove it. Here is the test result after conversion. ]# ./test_bridge_backup_port.sh Backup port --- TEST: Forwarding out of swp1[ OK ] TEST: No forwarding out of vx0 [ OK ] TEST: swp1

[PATCH net-next 24/38] selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./stress_reuseport_listen.sh listen 24000 socks took 0.47714 Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/stress_reuseport_listen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/s

[PATCH net-next 23/38] selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh

2023-11-24 Thread Hangbin Liu
rename server_ns/client_ns to unique name so we can run the tests in parallel. Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/setup_loopback.sh | 8 +--- tools/testing/selftests/net/setup_veth.sh | 9 ++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/t

[PATCH net-next 22/38] selftests/net: convert sctp_vrf.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./sctp_vrf.sh Testing For SCTP VRF: TEST 01: nobind, connect from client 1, l3mdev_accept=1, Y [PASS] ... TEST 12: bind vrf-2 & 1 in server, connect from client 1 & 2, N [PASS] ***v6 Tests Done*** Signed-off-by: Hangbin Liu --- tools/testing/selftest

[PATCH net-next 21/38] selftests/net: convert rtnetlink.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./rtnetlink.sh PASS: address proto IPv4 PASS: address proto IPv6 Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/rtnetlink.sh | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftest

[PATCH net-next 20/38] selftests/net: convert fdb_flush.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./fdb_flush.sh TEST: vx10: Expected 5 FDB entries, got 5 [ OK ] TEST: vx20: Expected 5 FDB entries, got 5 [ OK ] ... TEST: vx10: Expected 5 FDB entries, got 5 [ OK ] TEST: Test

[PATCH net-next 19/38] selftests/net: convert netns-name.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
This test will move the device to netns 1. Add a new test_ns to do this. Here is the test result after conversion. ]# ./netns-name.sh netns-name.sh [ OK ] Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/netns-name.sh | 44 +++ 1 file ch

[PATCH net-next 18/38] selftests/net: convert ndisc_unsolicited_na_test.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./ndisc_unsolicited_na_test.sh TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=1 forwarding=1 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=0 forwarding=0 [ OK ] TEST: test_unsolic

[PATCH net-next 17/38] selftests/net: convert l2tp.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./l2tp.sh TEST: IPv4 basic L2TP tunnel[ OK ] TEST: IPv4 route through L2TP tunnel[ OK ] TEST: IPv6 basic L2TP tunnel[ OK ] TEST: IPv6 route t

[PATCH net-next 16/38] selftests/net: convert ioam6.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./ioam6.sh -- OUTPUT tests -- TEST: Unknown IOAM namespace (inline mode) [ OK ] TES

[PATCH net-next 15/38] sleftests/net: convert icmp.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./icmp.sh OK Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/icmp.sh | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/icmp.sh b/tools/testing/selftests/net/icmp.sh index e4b04cd164

[PATCH net-next 14/38] selftests/net: convert icmp_redirect.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. # ./icmp_redirect.sh ### Legacy routing ### TEST: IPv4: redirect exception

[PATCH net-next 12/38] selftests/net: convert fib_tests.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./fib_tests.sh Single path route test Start point TEST: IPv4 fibmatch [ OK ] ... Fib6 garbage collection test TEST: ipv6 route garbage collection [ OK ] IPv4

[PATCH net-next 13/38] selftests/net: convert gre_gso.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./gre_gso.sh TEST: GREv6/v4 - copy file w/ TSO [ OK ] TEST: GREv6/v4 - copy file w/ GSO [ OK ] TEST: GREv6/v6 - copy file w/ TSO [ OK ]

[PATCH net-next 11/38] selftests/net: convert fib_rule_tests.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./fib_rule_tests.sh TEST: rule6 check: oif redirect to table [ OK ] ... TEST: rule4 dsfield tcp connect (dsfield 0x07)[ OK ] Tests passed: 66 Tests failed: 0 Signed-off-by: Hangbin Liu --- tools/testing

[PATCH net-next 10/38] selftests/net: convert fib-onlink-tests.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Remove PEER_CMD, which is not used in this test Here is the test result after conversion. ]# ./fib-onlink-tests.sh Error: ipv4: FIB table does not exist. Flush terminated Error: ipv6: FIB table does not exist. Flush terminated Configuring interface

[PATCH net-next 09/38] selftests/net: convert fib_nexthops.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./fib_nexthops.sh Basic functional tests -- TEST: List with nothing defined [ OK ] TEST: Nexthop get on non-existent id[ OK ] ... TEST: IPv6 resilient nexthop gro

[PATCH net-next 08/38] selftests/net: convert fib_nexthop_nongw.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./fib_nexthop_nongw.sh TEST: nexthop: get route with nexthop without gw[ OK ] TEST: nexthop: ping through nexthop without gw [ OK ] Signed-off-by: Hangbin Liu --- .../selftests/net/fib_nexthop_nongw.sh

[PATCH net-next 07/38] selftests/net: convert fib_nexthop_multiprefix to run it in unique namespace

2023-11-24 Thread Hangbin Liu
There is no need cleanup since the lib trap will clean all created ns. Here is the test result after conversion. ]# ./fib_nexthop_multiprefix.sh TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv6: host 0 to host 1, mtu 1300 [ OK ] T

[PATCH net-next 06/38] selftests/net: convert fcnal-test.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. There are some failures, but it also exists on my system without this patch. So it's not affectec by this patch and I will check the reason later. ]# time ./fcnal-test.sh /usr/bin/which: no nettest in (/root/.local/bin:/root/bin:/usr/share/Modules/bin

[PATCH net-next 05/38] selftests/net: convert drop_monitor_tests.sh to run it in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./drop_monitor_tests.sh Software drops test TEST: Capturing active software drops [ OK ] TEST: Capturing inactive software drops [ OK ] Hardware drops test TEST: Capturing active ha

[PATCH net-next 04/38] selftests/net: convert cmsg tests to make them run in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./cmsg_ipv6.sh OK ]# ./cmsg_so_mark.sh OK ]# ./cmsg_time.sh OK Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/cmsg_ipv6.sh| 10 -- tools/testing/selftests/net/cmsg_so_mark.sh | 7 --- tools/testing/selftests/net/cmsg_time

[PATCH net-next 03/38] selftest: arp_ndisc_untracked_subnets.sh convert to run test in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. 2 tests also failed without this patch ]# ./arp_ndisc_untracked_subnets.sh TEST: test_arp: accept_arp=0 [ OK ] TEST: test_arp: accept_arp=1 [FAIL] TEST: test_arp: a

[PATCH net-next 02/38] selftests/net: arp_ndisc_evict_nocarrier.sh convert to run test in unique namespace

2023-11-24 Thread Hangbin Liu
Here is the test result after conversion. ]# ./arp_ndisc_evict_nocarrier.sh run arp_evict_nocarrier=1 test ok run arp_evict_nocarrier=0 test ok run all.arp_evict_nocarrier=0 test ok run ndisc_evict_nocarrier=1 test ok run ndisc_evict_nocarrier=0 test ok run all.ndisc_evict_nocarrier=0 test ok Sig

[PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-24 Thread Hangbin Liu
Add a lib.sh for net selftests. This file can be used to define commonly used variables and functions. Add function setup_ns() for user to create unique namespaces with given prefix name. Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/li

  1   2   >