[PATCH v1 3/3] KVM: selftests: Add a test case for KVM_X86_DISABLE_EXITS_HLT

2024-03-26 Thread Manali Shukla
By default, HLT instruction executed by guest is intercepted by hypervisor. However, KVM_CAP_X86_DISABLE_EXITS capability can be used to not intercept HLT by setting KVM_X86_DISABLE_EXITS_HLT. Add a test case to test KVM_X86_DISABLE_EXITS_HLT functionality. Suggested-by: Sean Christopherson

[PATCH v1 0/3] Add a test case for KVM_X86_DISABLE_EXIT

2024-03-26 Thread Manali Shukla
By default, HLT instruction executed by guest is intercepted by hypervisor. However, KVM_CAP_X86_DISABLE_EXITS capability can be used to not intercept HLT by setting KVM_X86_DISABLE_EXITS_HLT. By default, vms are created with in-kernel APIC support in KVM selftests. VM needs to be created without

[PATCH v1 2/3] KVM: selftests: Change __vm_create() to create a vm without in-kernel APIC

2024-03-26 Thread Manali Shukla
Change __vm_create() to incorporate creation of a vm without in-kernel APIC. Currently, all the vms are created with in-kernel APIC support in KVM selftests because KVM_CREATE_IRQCHIP ioctl is called by default from kvm_arch_vm_post_create(). Add a flag in __vm_create() for a userspace to decide

[PATCH v1 1/3] KVM: selftests: Add safe_halt() and cli() helpers to common code

2024-03-26 Thread Manali Shukla
Add safe_halt() and cli() helpers to processor.h to make them broadly available in KVM selftests. Suggested-by: Sean Christopherson Signed-off-by: Manali Shukla --- .../selftests/kvm/include/x86_64/processor.h| 17 + 1 file changed, 17 insertions(+) diff --git

[PATCH] selftests: cgroup: skip test_cgcore_lesser_ns_open when cgroup2 mounted without nsdelegate

2024-03-26 Thread Tianchen Ding
The test case test_cgcore_lesser_ns_open only tasks effect when cgroup2 is mounted with "nsdelegate" mount option. If it misses this option, or is remounted without "nsdelegate", the test case will fail. For example, running bpf/test_cgroup_storage first, and then run cgroup/test_core will fail on

Re: [RFC PATCH net-next v7 13/14] net: add devmem TCP documentation

2024-03-26 Thread Randy Dunlap
Hi, On 3/26/24 15:50, Mina Almasry wrote: > Add documentation outlining the usage and details of devmem TCP. > > Signed-off-by: Mina Almasry > > --- > > v7: > - Applied docs suggestions (Jakub). > > v2: > > - Missing spdx (simon) > - add to index.rst (simon) > > --- >

[RFC PATCH net-next v7 14/14] selftests: add ncdevmem, netcat for devmem TCP

2024-03-26 Thread Mina Almasry
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 netcat running on a peer, or a ncdevmem running on a peer. In addition to normal netcat support,

[RFC PATCH net-next v7 13/14] net: add devmem TCP documentation

2024-03-26 Thread Mina Almasry
Add documentation outlining the usage and details of devmem TCP. Signed-off-by: Mina Almasry --- v7: - Applied docs suggestions (Jakub). v2: - Missing spdx (simon) - add to index.rst (simon) --- Documentation/networking/devmem.rst | 256

[RFC PATCH net-next v7 11/14] tcp: RX path for devmem TCP

2024-03-26 Thread Mina Almasry
In tcp_recvmsg_locked(), detect if the skb being received by the user is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM flag - pass it to tcp_recvmsg_devmem() for custom handling. tcp_recvmsg_devmem() copies any data in the skb header to the linear buffer, and returns a

[RFC PATCH net-next v7 12/14] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-03-26 Thread Mina Almasry
Add an interface for the user to notify the kernel that it is done reading the devmem dmabuf frags returned as cmsg. The kernel will drop the reference on the frags to make them available for reuse. Signed-off-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry ---

[RFC PATCH net-next v7 10/14] net: add support for skbs with unreadable frags

2024-03-26 Thread Mina Almasry
For device memory TCP, we expect the skb headers to be available in host memory for access, and we expect the skb frags to be in device memory and unaccessible to the host. We expect there to be no mixing and matching of device memory frags (unaccessible) with host memory frags (accessible) in the

[RFC PATCH net-next v7 09/14] net: support non paged skb frags

2024-03-26 Thread Mina Almasry
Make skb_frag_page() fail in the case where the frag is not backed by a page, and fix its relevant callers to handle this case. Signed-off-by: Mina Almasry --- v6: - Rebased on top of the merged netmem changes. Changes in v1: - Fix illegal_highdma() (Yunsheng). - Rework napi_pp_put_page()

[RFC PATCH net-next v7 07/14] page_pool: devmem support

2024-03-26 Thread Mina Almasry
Convert netmem to be a union of struct page and struct netmem. Overload the LSB of struct netmem* to indicate that it's a net_iov, otherwise it's a page. Currently these entries in struct page are rented by the page_pool and used exclusively by the net stack: struct { unsigned long

[RFC PATCH net-next v7 08/14] memory-provider: dmabuf devmem memory provider

2024-03-26 Thread Mina Almasry
Implement a memory provider that allocates dmabuf devmem in the form of net_iov. The provider receives a reference to the struct netdev_dmabuf_binding via the pool->mp_priv pointer. The driver needs to set this pointer for the provider in the net_iov. The provider obtains a reference on the

[RFC PATCH net-next v7 06/14] page_pool: convert to use netmem

2024-03-26 Thread Mina Almasry
Abstrace the memory type from the page_pool so we can later add support for new memory types. Convert the page_pool to use the new netmem type abstraction, rather than use struct page directly. As of this patch the netmem type is a no-op abstraction: it's always a struct page underneath. All the

[RFC PATCH net-next v7 05/14] netdev: netdevice devmem allocator

2024-03-26 Thread Mina Almasry
Implement netdev devmem allocator. The allocator takes a given struct netdev_dmabuf_binding as input and allocates net_iov from that binding. The allocation simply delegates to the binding's genpool for the allocation logic and wraps the returned memory region in a net_iov struct. Signed-off-by:

[RFC PATCH net-next v7 04/14] netdev: support binding dma-buf to netdevice

2024-03-26 Thread Mina Almasry
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 entries in the sg_table from mapping will be inserted into a

[RFC PATCH net-next v7 03/14] net: netdev netlink api to bind dma-buf to a net device

2024-03-26 Thread Mina Almasry
API takes the dma-buf fd as input, and binds it to the netdevice. The user can specify the rx queues to bind the dma-buf to. Suggested-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- v7: - Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check. Changes in v1: - Add rx-queue-type

[RFC PATCH net-next v7 02/14] net: page_pool: create hooks for custom page providers

2024-03-26 Thread Mina Almasry
From: Jakub Kicinski The page providers which try to reuse the same pages will need to hold onto the ref, even if page gets released from the pool - as in releasing the page from the pp just transfers the "ownership" reference from pp to the provider, and provider will wait for other references

[RFC PATCH net-next v7 01/14] queue_api: define queue api

2024-03-26 Thread Mina Almasry
This API enables the net stack to reset the queues used for devmem TCP. Signed-off-by: Mina Almasry --- include/linux/netdevice.h | 3 +++ include/net/netdev_queues.h | 27 +++ 2 files changed, 30 insertions(+) diff --git a/include/linux/netdevice.h

[RFC PATCH net-next v7 00/14] Device Memory TCP

2024-03-26 Thread Mina Almasry
RFC v7: === Major Changes: -- This revision largely rebases on top of net-next and addresses the feedback RFCv6 received from folks, namely Jakub, Yunsheng, Arnd, David, & Pavel. The series remains in RFC because the queue-API ndos defined in this series are not yet implemented.

Re: [PATCH] selftests/exec: execveat: Improve debug reporting

2024-03-26 Thread Kees Cook
On Tue, Mar 26, 2024 at 02:46:02PM -0600, Shuah Khan wrote: > On 3/14/24 02:54, Muhammad Usama Anjum wrote: > > On 3/13/24 11:56 PM, Kees Cook wrote: > > > Children processes were reporting their status, duplicating the > > > parent's. Remove that, and add some additional details about the test >

Re: [PATCH v2] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-26 Thread Chang S. Bae
On 3/26/2024 1:51 PM, Shuah Khan wrote: show that there are bo backwards compatibility issues In older kernels lacking AMX support [1], arch_prctl() returns EINVAL. With AMX support, the kernel will properly set 'features'. It is also worth noting that this simplification was previously

[PATCH v2] selftests/harness: Prevent infinite loop due to Assert in FIXTURE_TEARDOWN

2024-03-26 Thread Shengyu Li
This patch addresses an issue in the selftests/harness where an assertion within FIXTURE_TEARDOWN could trigger an infinite loop. The problem arises because the teardown procedure is meant to execute once, but the presence of failing assertions (ASSERT_EQ(0, 1)) leads to repeated attempts to

Re: [PATCH v5 2/2] selftests: dmabuf-heap: add config file for the test

2024-03-26 Thread Shuah Khan
On 3/4/24 23:08, Muhammad Usama Anjum wrote: The config fragment enlists all the config options needed for the test. This config is merged into the kernel's config on which this test is run. Reviewed-by: T.J. Mercier Signed-off-by: Muhammad Usama Anjum --- Changes since v1: - Add reviewed-by

Re: [PATCH v5 1/2] selftests/dmabuf-heap: conform test to TAP format output

2024-03-26 Thread Shuah Khan
On 3/4/24 23:08, Muhammad Usama Anjum wrote: Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Reviewed-by: T.J. Mercier Signed-off-by: Muhammad Usama Anjum --- Changes since v4: - close fds correctly with

Re: [PATCH v2] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-26 Thread Shuah Khan
On 3/14/24 05:44, Muhammad Usama Anjum wrote: Skip instead of failing when prerequisite conditions aren't fulfilled, such as invalid xstate values etc. This patch would make the tests show as skip when run by: make -C tools/testing/selftests/ TARGETS=x86 run_tests ... # timeout set to

Re: [PATCH] selftests/exec: execveat: Improve debug reporting

2024-03-26 Thread Shuah Khan
On 3/14/24 02:54, Muhammad Usama Anjum wrote: On 3/13/24 11:56 PM, Kees Cook wrote: Children processes were reporting their status, duplicating the parent's. Remove that, and add some additional details about the test execution. Signed-off-by: Kees Cook --- Cc: Eric Biederman Cc: Shuah Khan

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

2024-03-26 Thread Mark Brown
On Tue, Mar 26, 2024 at 02:20:08PM -0600, Shuah Khan wrote: > I am seeing the following compile warnings. Please fix and send patch > on top pf linux-kselftest fixes. Which toolchain and architecture are you using? These compile cleanly for me. signature.asc Description: PGP signature

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

2024-03-26 Thread Shuah Khan
On 3/26/24 13:17, Shuah Khan wrote: On 3/25/24 08:29, 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

Re: [RFC PATCH net-next v6 02/15] net: page_pool: create hooks for custom page providers

2024-03-26 Thread Mina Almasry
On Sun, Mar 24, 2024 at 4:37 PM Christoph Hellwig wrote: > > On Fri, Mar 22, 2024 at 10:54:54AM -0700, Mina Almasry wrote: > > Sorry I don't mean to argue but as David mentioned, there are some > > plans in the works and ones not in the works to extend this to other > > memory types. David

Re: [RFC PATCH net-next v6 00/15] Device Memory TCP

2024-03-26 Thread Mina Almasry
On Tue, Mar 26, 2024 at 5:47 AM Yunsheng Lin wrote: > > On 2024/3/26 8:28, Mina Almasry wrote: > > On Tue, Mar 5, 2024 at 11:38 AM Mina Almasry wrote: > >> > >> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote: > >>> > >>> On 2024/3/5 10:01, Mina Almasry wrote: > >>> > >>> ... > >>> > >

Re: [PATCH 0/2] kselftest/tty: Improve integration with automated systems

2024-03-26 Thread Mark Brown
On Tue, Mar 26, 2024 at 01:49:11PM -0600, Shuah Khan wrote: > On 3/6/24 15:51, Greg Kroah-Hartman wrote: > > On Wed, Mar 06, 2024 at 07:21:24PM +, Mark Brown wrote: > > > This cleans up the output of the tty_tstamp_update selftest to play a > > > bit more nicely with automated systems parsing

Re: [PATCH 2/2] selftests: x86: test_mremap_vdso: conform test to TAP format output

2024-03-26 Thread Shuah Khan
On 3/14/24 04:32, Muhammad Usama Anjum wrote: Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum This one looks okay. Please address the problems on patch 1/2 and send v2

Re: [PATCH 1/2] selftests: x86: test_vsyscall: conform test to TAP format output

2024-03-26 Thread Shuah Khan
On 3/14/24 04:32, Muhammad Usama Anjum wrote: Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Without using TAP messages, the passed/failed/skip test names cannot be found. Signed-off-by: Muhammad Usama

Re: [PATCH 0/2] kselftest/tty: Improve integration with automated systems

2024-03-26 Thread Shuah Khan
On 3/6/24 15:51, Greg Kroah-Hartman wrote: On Wed, Mar 06, 2024 at 07:21:24PM +, Mark Brown wrote: This cleans up the output of the tty_tstamp_update selftest to play a bit more nicely with automated systems parsing the test output. To do this I've also added a new helper

Re: [PATCH v2] selftests/seccomp: Try to fit runtime of benchmark into timeout

2024-03-26 Thread Shuah Khan
On 3/25/24 10:57, Mark Brown wrote: The seccomp benchmark runs five scenarios, one calibration run with no seccomp filters enabled then four further runs each adding a filter. The calibration run times itself for 15s and then each additional run executes for the same number of times. Currently

Re: [PATCH] selftests/harness: Prevent infinite loop due to Assert in FIXTURE_TEARDOWN

2024-03-26 Thread Shuah Khan
On 3/14/24 16:43, Shengyu Li wrote: This patch addresses an issue in the selftests/harness where an assertion within FIXTURE_TEARDOWN could trigger an infinite loop. The problem arises because the teardown procedure is meant to execute once, but the presence of failing assertions

Re: [PATCH] selftests/ftrace: Fix event filter target_func selection

2024-03-26 Thread Shuah Khan
On 3/20/24 18:09, Masami Hiramatsu (Google) wrote: On Wed, 20 Mar 2024 14:18:44 + Mark Rutland wrote: The event filter function test has been failing in our internal test farm: | # not ok 33 event filter function - test event filtering on functions Running the test in verbose mode

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

2024-03-26 Thread Shuah Khan
On 3/25/24 08:29, 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 will compare runs by looking at

Re: [PATCH 0/2] tracing/selftests: Verbosity improvements to KTAP output

2024-03-26 Thread Shuah Khan
On 3/26/24 10:08, Steven Rostedt wrote: Shuah, If Masami is OK with this, can you take this through your tree? Acked-by: Steven Rostedt (Google) -- Steve Yes. Will do once Masami gives me the okay. On Mon, 25 Mar 2024 16:15:49 + Mark Brown wrote: This series aims to improve the

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Paolo Abeni
On Tue, 2024-03-26 at 18:25 +0100, Richard Gobert wrote: > Paolo Abeni wrote: > > Hi, > > > > On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: > > > This patch is meaningful by itself - removing checks against non-relevant > > > packets and making the flush/flush_id checks in a single

Re: [RFC PATCH net-next mlxsw 03/14] selftests: forwarding: README: Document customization

2024-03-26 Thread Petr Machata
Jakub Kicinski writes: > On Tue, 26 Mar 2024 11:31:31 +0100 Petr Machata wrote: >> Jakub Kicinski writes: >> >> > a standard feature of kselftest. If "env" file exists in the test >> > directory kselftest would load its contents before running every test. >> > >> > That's more of a broader

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Paolo Abeni wrote: > Hi, > > On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: >> This patch is meaningful by itself - removing checks against non-relevant >> packets and making the flush/flush_id checks in a single place. > > I'm personally not sure this patch is a win. The code churn is

[PATCH net-next 14/14] selftests: forwarding: Add a test for testing lib.sh functionality

2024-03-26 Thread Petr Machata
Rerunning various scenarios to make sure lib.sh changes do not impact the observable behavior is no fun. Add a selftest at least for the bare basics -- the mechanics of setting RET, retmsg, and EXIT_STATUS. Since the selftest itself uses lib.sh, it would be possible to break lib.sh in such a way

[PATCH net-next 13/14] selftests: forwarding: router_mpath_nh_lib: Don't skip, xfail on veth

2024-03-26 Thread Petr Machata
When the NH group stats tests are currently run on a veth topology, the HW-stats leg of each test is SKIP'ped. But kernel networking CI interprets skips as a sign that tooling is missing, and prompts maintainer investigation. Lack of capability to pass a test should be expressed as XFAIL.

[PATCH net-next 10/14] selftests: forwarding: Convert log_test() to recognize RET values

2024-03-26 Thread Petr Machata
In a previous patch, the interpretation of RET value was changed to mean the kselftest framework constant with the test outcome: $ksft_pass, $ksft_xfail, etc. Update log_test() to recognize the various possible RET values. Then have EXIT_STATUS track the RET value of the current test. This

[PATCH net-next 12/14] selftests: forwarding: Mark performance-sensitive tests

2024-03-26 Thread Petr Machata
When run on a slow machine, the scheduler traffic tests can be expected to fail, and should be reported as XFAIL in that case. Therefore run these tests through the perf_sensitive wrapper. Signed-off-by: Petr Machata --- .../selftests/net/forwarding/sch_ets_tests.sh | 19 +++

[PATCH net-next 11/14] selftests: forwarding: Support for performance sensitive tests

2024-03-26 Thread Petr Machata
Several tests in the suite use large amounts of traffic to e.g. cause congestion and evaluate RED or shaper performance. These tests will not run well on a slow machine, be it one with heavy debug kernel, or a VM, or e.g. a single-board computer. Allow users to specify an environment variable,

[PATCH net-next 08/14] selftests: lib: Define more kselftest exit codes

2024-03-26 Thread Petr Machata
The following patches will operate with more exit codes besides ksft_skip. Add them here. Additionally, move a duplicated skip exit code definition from forwarding/tc_tunnel_key.sh. Keep a similar duplicate in forwarding/devlink_lib.sh, because even though lib.sh will have been sourced in all

[PATCH net-next 09/14] selftests: forwarding: Have RET track kselftest framework constants

2024-03-26 Thread Petr Machata
The variable RET keeps track of whether the test under execution has so far failed or not. Currently it works in binary fashion: zero means everything is fine, non-zero means something failed. log_test() then uses the value to given a human-readable message. In order to allow log_test() to report

[PATCH net-next 07/14] selftests: forwarding: Change inappropriate log_test_skip() calls

2024-03-26 Thread Petr Machata
The SKIP return should be used for cases where tooling of the machine under test is lacking. For cases where HW is lacking, the appropriate outcome is XFAIL. This is the case with ethtool_rmon and mlxsw_lib. For these, introduce a new helper, log_test_xfail(). Do the same for

[PATCH net-next 06/14] selftests: forwarding: Ditch skip_on_veth()

2024-03-26 Thread Petr Machata
Since the selftests that are not supposed to run on veth pairs are now in their own dedicated directory, the skip_on_veth logic can go away. Drop it from the selftests, and from lib.sh. Cc: Danielle Ratson Signed-off-by: Petr Machata --- .../testing/selftests/drivers/net/hw/ethtool.sh | 2 --

[PATCH net-next 05/14] selftests: forwarding: Move several selftests

2024-03-26 Thread Petr Machata
The tests in net/forwarding are generally expected to be HW-independent. There are however several tests that, while not depending on any HW in particular, nevertheless depend on being used on HW interfaces. Placing these selftests to net/forwarding is confusing, because the selftest will just

[PATCH net-next 04/14] selftests: forwarding: ipip_lib: Do not import lib.sh

2024-03-26 Thread Petr Machata
This library is always sourced in the context where lib.sh has already been sourced as well. Therefore drop the explicit sourcing and expect the client to already have done it. This will simplify moving some of the clients to a different directory. Signed-off-by: Petr Machata ---

[PATCH net-next 03/14] selftests: forwarding: README: Document customization

2024-03-26 Thread Petr Machata
That any sort of customization is possible at all, let alone how it should be done, is currently not at all clear. Document the whats and hows in README. Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier --- tools/testing/selftests/net/forwarding/README | 33 +++ 1 file

[PATCH net-next 02/14] selftests: forwarding.config.sample: Move overrides to lib.sh

2024-03-26 Thread Petr Machata
forwarding.config.sample, net/lib.sh and net/forwarding/lib.sh contain definitions and redefinitions of some of the same variables. The overlap between net/forwarding/lib.sh and forwarding.config.sample is especially large. This duplication is a potential source of confusion and problems. It

[PATCH net-next 01/14] selftests: net: libs: Change variable fallback syntax

2024-03-26 Thread Petr Machata
The current syntax of X=${X:=X} first evaluates the ${X:=Y} expression, which either uses the existing value of $X if there is one, or uses the value of "Y" as a fallback, and assigns it to X. The expression is then replaced with the now-current value of $X. Assigning that value to X once more is

[PATCH net-next 00/14] selftests: Fixes for kernel CI

2024-03-26 Thread Petr Machata
As discussed on the bi-weekly call on Jan 30, and in mailing around kernel CI effort, some changes are desirable in the suite of forwarding selftests the better to work with the CI tooling. Namely: - The forwarding selftests use a configuration file where names of interfaces are defined and

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Paolo Abeni
Hi, On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: > This patch is meaningful by itself - removing checks against non-relevant > packets and making the flush/flush_id checks in a single place. I'm personally not sure this patch is a win. The code churn is significant. I understand this

Re: [PATCH 0/2] tracing/selftests: Verbosity improvements to KTAP output

2024-03-26 Thread Steven Rostedt
Shuah, If Masami is OK with this, can you take this through your tree? Acked-by: Steven Rostedt (Google) -- Steve On Mon, 25 Mar 2024 16:15:49 + Mark Brown wrote: > This series aims to improve the usability of the ftrace selftests when > running as part of the kselftest runner,

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote:> One issue: if the do this move in net/next, then a later fix that > relies on it cannot be backporter to older stable kernels. > I understand. I can either add a first commit to this series which fixes the bug by checking ->flush and ->flush_id in

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Willem de Bruijn
Richard Gobert wrote: > Eric Dumazet wrote: > > > > I do not understand this patch 4/4 then. > > > > Why bother moving stuff in net/ipv4/tcp_offload.c if we plan to move > > it back to where it belongs ? > > Willem also pointed that out, and I agree. I'll post a v5 and move this > functionality

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-26 Thread Jason Gunthorpe
On Tue, Mar 26, 2024 at 06:09:34PM +0500, Muhammad Usama Anjum wrote: > Even after applying this config patch and following snippet (which doesn't > terminate the program if mmap doesn't allocate exactly as the hint), I'm > finding failed tests. > > @@ -1746,7 +1748,7 @@

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Eric Dumazet wrote: > > I do not understand this patch 4/4 then. > > Why bother moving stuff in net/ipv4/tcp_offload.c if we plan to move > it back to where it belongs ? Willem also pointed that out, and I agree. I'll post a v5 and move this functionality to gro.c. Currently, gro_network_flush

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Eric Dumazet
On Tue, Mar 26, 2024 at 3:43 PM Richard Gobert wrote: > > Eric Dumazet wrote: > > On Mon, Mar 25, 2024 at 7:27 PM Richard Gobert > > wrote: > >> > >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > >> iph->id, ...) against all packets in a loop. These flush checks are used

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Eric Dumazet wrote: > On Mon, Mar 25, 2024 at 7:27 PM Richard Gobert > wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used >> currently only in tcp flows in GRO. > > I think this is a bug. >

Re: [PATCH] kunit: configs: Enable CONFIG_DAMON_DBGFS_DEPRECATED for --alltests

2024-03-26 Thread SeongJae Park
On Tue, 26 Mar 2024 18:07:38 +0800 David Gow wrote: > This is required, as CONFIG_DAMON_DEBUGFS is enabled, and --alltests UML > builds will fail due to the missing config option otherwise. > > Fixes: f4cba4bf6777 ("mm/damon: rename CONFIG_DAMON_DBGFS to > DAMON_DBGFS_DEPRECATED") >

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Eric Dumazet
On Mon, Mar 25, 2024 at 7:27 PM Richard Gobert wrote: > > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > iph->id, ...) against all packets in a loop. These flush checks are used > currently only in tcp flows in GRO. I think this is a bug. GRO should not aggregate packets

Re: [PATCH net] selftests: netdevsim: set test timeout to 10 minutes

2024-03-26 Thread Simon Horman
On Mon, Mar 25, 2024 at 08:56:11AM -0700, Jakub Kicinski wrote: > The longest running netdevsim test, nexthop.sh, currently takes > 5 min to finish. Around 260s to be exact, and 310s on a debug kernel. > The default timeout in selftest is 45sec, so we need an explicit > config. Give ourselves some

Re: [RFC PATCH net-next mlxsw 03/14] selftests: forwarding: README: Document customization

2024-03-26 Thread Jakub Kicinski
On Tue, 26 Mar 2024 11:31:31 +0100 Petr Machata wrote: > Jakub Kicinski writes: > > > On Mon, 25 Mar 2024 18:29:10 +0100 Petr Machata wrote: > >> +The forwarding selftests framework uses a number of variables that > >> +influence its behavior and tools it invokes, and how it invokes them, in >

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote: > My main concern is moving this code to tcp_offload.c, if it likely > soon will be moved elsewhere again. Got it. I'll move these functions to gro.c and post a v5 with Jakub's requests as well.

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Willem de Bruijn
Richard Gobert wrote: > Willem de Bruijn wrote: > > In v3 we discussed how the flush on network layer differences (like > > TTL or ToS) currently only affect the TCP GRO path, but should apply > > more broadly. > > > > We agreed that it is fine to leave that to a separate patch series. > > > >

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-26 Thread Muhammad Usama Anjum
Even after applying this config patch and following snippet (which doesn't terminate the program if mmap doesn't allocate exactly as the hint), I'm finding failed tests. @@ -1746,7 +1748,7 @@ FIXTURE_SETUP(iommufd_dirty_tracking) assert((uintptr_t)self->buffer % HUGEPAGE_SIZE == 0);

Re: [RFC PATCH net-next v6 00/15] Device Memory TCP

2024-03-26 Thread Yunsheng Lin
On 2024/3/26 8:28, Mina Almasry wrote: > On Tue, Mar 5, 2024 at 11:38 AM Mina Almasry wrote: >> >> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote: >>> >>> On 2024/3/5 10:01, Mina Almasry wrote: >>> >>> ... >>> Perf - page-pool benchmark: ---

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote: > In v3 we discussed how the flush on network layer differences (like > TTL or ToS) currently only affect the TCP GRO path, but should apply > more broadly. > > We agreed that it is fine to leave that to a separate patch series. > > But seeing this patch, it introduces a

Re: [RFC PATCH net-next mlxsw 03/14] selftests: forwarding: README: Document customization

2024-03-26 Thread Petr Machata
Jakub Kicinski writes: > On Mon, 25 Mar 2024 18:29:10 +0100 Petr Machata wrote: >> +The forwarding selftests framework uses a number of variables that >> +influence its behavior and tools it invokes, and how it invokes them, in >> +various ways. A number of these variables can be overridden.

Re: [RFC PATCH net-next mlxsw 09/14] selftests: forwarding: Have RET track kselftest framework constants

2024-03-26 Thread Petr Machata
Jakub Kicinski writes: > On Mon, 25 Mar 2024 18:29:16 +0100 Petr Machata wrote: >> +set_ret() >> +{ >> +local nret=$1; shift > > May be worth throwing in a comment that $1 must be a legal ksft ret > code, not any exit code from random commands. Hmm, yeah. I'll rename to

Re: [PATCH net 3/4] selftests: tls: add test with a partially invalid iov

2024-03-26 Thread Simon Horman
On Mon, Mar 25, 2024 at 04:56:47PM +0100, Sabrina Dubroca wrote: > Make sure that we don't return more bytes than we actually received if > the userspace buffer was bogus. We expect to receive at least the rest > of rec1, and possibly some of rec2 (currently, we don't, but that > would be ok). >

Re: [RFC PATCH net-next mlxsw 00/14] selftests: Fixes for kernel CI

2024-03-26 Thread Petr Machata
Jakub Kicinski writes: > On Mon, 25 Mar 2024 18:29:07 +0100 Petr Machata wrote: >> As discussed on the bi-weekly call on Jan 30, and in mailing around >> kernel CI effort, some changes are desirable in the suite of forwarding >> selftests the better to work with the CI tooling. > > Excellent.

Re: [PATCH] kunit: configs: Enable CONFIG_DAMON_DBGFS_DEPRECATED for --alltests

2024-03-26 Thread Johannes Berg
On Tue, 2024-03-26 at 10:07 +, David Gow wrote: > > Johannes: Does this conflict with the CONFIG_NETDEVICES / CONFIG_WLAN > fixes to all_tests.config? I'd assume not, but I'm happy to take them > via KUnit if you'd prefer anyway. > I already have it in my tree, so I guess I'd prefer it to

Re: kunit alltests runs broken in mainline

2024-03-26 Thread David Gow
On Tue, 26 Mar 2024 at 15:55, Johannes Berg wrote: > > On Tue, 2024-03-26 at 01:52 +, Jakub Kicinski wrote: > > > > I'm late to the party, but FWIW I had to toss this into netdev testing > > tree as a local patch: > > > > CONFIG_NETDEVICES=y > > CONFIG_WLAN=y > > I'll send this in the next

[PATCH v19 RESEND 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-03-26 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/Makefile

[PATCH] kunit: configs: Enable CONFIG_DAMON_DBGFS_DEPRECATED for --alltests

2024-03-26 Thread David Gow
This is required, as CONFIG_DAMON_DEBUGFS is enabled, and --alltests UML builds will fail due to the missing config option otherwise. Fixes: f4cba4bf6777 ("mm/damon: rename CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED") Signed-off-by: David Gow --- This is breaking all UML alltests builds, so

[PATCH v19 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-03-26 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/Makefile

Re: [PATCH] KVM: selftests: Use TAP in the steal_time test

2024-03-26 Thread Muhammad Usama Anjum
On 10/19/23 2:59 PM, Thomas Huth wrote: > For easier use of the tests in automation and for having some > status information for the user while the test is running, let's > provide some TAP output in this test. LGTM. I was thinking why kselftest.h hasn't been included. I found out that test_util.h

Re: [PATCH] KVM: selftests: Use TAP in the steal_time test

2024-03-26 Thread Zhao Liu
On Thu, Oct 19, 2023 at 11:59:00AM +0200, Thomas Huth wrote: > Date: Thu, 19 Oct 2023 11:59:00 +0200 > From: Thomas Huth > Subject: [PATCH] KVM: selftests: Use TAP in the steal_time test > > For easier use of the tests in automation and for having some > status information for the user while

Re: kunit alltests runs broken in mainline

2024-03-26 Thread Johannes Berg
On Tue, 2024-03-26 at 01:52 +, Jakub Kicinski wrote: > > I'm late to the party, but FWIW I had to toss this into netdev testing > tree as a local patch: > > CONFIG_NETDEVICES=y > CONFIG_WLAN=y I'll send this in the next wireless pull, soon. > CONFIG_DAMON_DBGFS_DEPRECATED=y > The DAMON