On 2024-04-02 10:31, Jakub Kicinski wrote:
> On Tue, 2 Apr 2024 18:37:44 +0200 Petr Machata wrote:
>> Yeah, this would be usually done through context managers, as I mention
>> in the other e-mail. But then cfg would be lexically scoped, which IMHO
>> is a good thing, but then it needs to be passed
On 2024-04-01 18:05, Jakub Kicinski wrote:
> Add a very simple test to make sure drivers report expected
> stats. Drivers which implement FEC or pause configuration
> should report relevant stats. Qstats must be reported,
> at least packet and byte counts, and they must match
> total device stats.
On 2024-04-01 18:05, Jakub Kicinski wrote:
> Add drivers/net as a target for mixed-use tests.
> The setup is expected to work similarly to the forwarding tests.
> Since we only need one interface (unlike forwarding tests)
> read the target device name from NETIF. If not present we'll
> try to run t
On 2024-04-01 18:05, Jakub Kicinski wrote:
> Real devices should implement qstats. Devices which support
> pause or FEC configuration should also report the relevant stats.
>
> nsim was missing FEC stats completely, some of the qstats
> and pause stats required toggling a debugfs knob.
>
> Note t
On 4/2/24 8:16 AM, Muhammad Usama Anjum wrote:
Yonghong Song,
Thank you so much for replying. I was missing how to run pipeline manually.
Thanks a ton.
On 4/1/24 11:53 PM, Yonghong Song wrote:
On 4/1/24 5:34 AM, Muhammad Usama Anjum wrote:
Move test_dev_cgroup.c to prog_tests/dev_cgroup.c t
Add a very simple test to make sure drivers report expected
stats. Drivers which implement FEC or pause configuration
should report relevant stats. Qstats must be reported,
at least packet and byte counts, and they must match
total device stats.
Tested with netdevsim, bnxt, in-tree and installed.
Add drivers/net as a target for mixed-use tests.
The setup is expected to work similarly to the forwarding tests.
Since we only need one interface (unlike forwarding tests)
read the target device name from NETIF. If not present we'll
try to run the test against netdevsim.
Signed-off-by: Jakub Kici
Real devices should implement qstats. Devices which support
pause or FEC configuration should also report the relevant stats.
nsim was missing FEC stats completely, some of the qstats
and pause stats required toggling a debugfs knob.
Note that the tests which used pause always initialize the sett
Add glue code for accessing the YNL library which lives under
tools/net and YAML spec files from under Documentation/.
Automatically figure out if tests are run in tree or not.
Since we'll want to use this library both from net and
drivers/net test targets make the library a target as well,
and aut
Add a trivial test using YNL.
$ ./tools/testing/selftests/net/nl_netdev.py
KTAP version 1
1..2
ok 1 nl_netdev.empty_check
ok 2 nl_netdev.lo_check
Instantiate the family once, it takes longer than the test itself.
Signed-off-by: Jakub Kicinski
---
v2:
- pass family as argument
CC: sh
Typing e.nl_msg.error when processing exception is a bit tedious
and counter-intuitive. Set a local .error member to the positive
value of the netlink level error.
Signed-off-by: Jakub Kicinski
---
CC: donald.hun...@gmail.com
CC: j...@resnulli.us
---
tools/net/ynl/lib/ynl.py | 3 ++-
1 file chan
When interfacing with the ethtool commands it's handy to
be able to use the names of the flags. Example:
ethnl.pause_get({"header": {"dev-index": cfg.ifindex,
"flags": {'stats'}}})
Note that not all commands accept all the flags,
but the meaning of the bits doe
Currently the options for writing networking tests are C, bash or
some mix of the two. YAML/Netlink gives us the ability to easily
interface with Netlink in higher level laguages. In particular,
there is a Python library already available in tree, under tools/net.
Add the scaffolding which allows w
kselftest/fixes kselftest-livepatch: 1 runs, 1 regressions
(linux_kselftest-fixes-6.9-rc2)
Regressions Summary
---
platform| arch | lab | compiler | defconfig
| regressions
+--+---+--+--
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, ncdevmem
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
---
v8:
- Applied docs suggestions (Randy). Thanks!
v7:
- Applied docs suggestions (Jakub).
v2:
- Missing spdx (simon)
- add to index.rst (simon)
fix docs
---
Documentation/networking/devmem.rst
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
---
v
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 cmsg
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
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() sli
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 netde
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 pp_mag
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 p
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:
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 genpool
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 to
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 t
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 b/include/linux/n
RFC v8:
===
Major Changes:
--
- Fixed build error generated by patch-by-patch build.
- Applied docs suggestions from Randy.
RFC v7:
===
Major Changes:
--
This revision largely rebases on top of net-next and addresses the feedback
RFCv6 received from folks, namel
On 2024-04-01 18:05, Jakub Kicinski wrote:
> Add a trivial test using YNL.
>
> $ ./tools/testing/selftests/net/nl_netdev.py
> KTAP version 1
> 1..2
> ok 1 nl_netdev.empty_check
> ok 2 nl_netdev.lo_check
>
> Instantiate the family once, it takes longer than the test itself.
>
> Signed-o
On 2024-04-01 18:05, Jakub Kicinski wrote:
> Add glue code for accessing the YNL library which lives under
> tools/net and YAML spec files from under Documentation/.
> Automatically figure out if tests are run in tree or not.
> Since we'll want to use this library both from net and
> drivers/net te
kselftest/fixes build: 4 builds: 0 failed, 4 passed, 1 warning
(linux_kselftest-fixes-6.9-rc2)
Full Build Summary:
https://kernelci.org/build/kselftest/branch/fixes/kernel/linux_kselftest-fixes-6.9-rc2/
Tree: kselftest
Branch: fixes
Git Describe: linux_kselftest-fixes-6.9-rc2
Git Commit: 224fe4
> The newer prog_tests/sock_addr.c was created when adding AF_UNIX support. It
> has
> a very similar setup as the older test_sock_addr.c and the intention was to
> finally retire test_sock_addr.c. e.g. It also has "load_fn loadfn" but is done
> with skeleton, the program is also attached to cgrou
On Wed, 3 Apr 2024 00:04:14 +0200 Petr Machata wrote:
> > Yes, I was wondering about that. It must be doable, IIRC
> > the multi-threading API "injects" args from a tuple.
> > I was thinking something along the lines of:
> >
> > with NetDrvEnv(__file__) as cfg:
> > ksft_run([check_paus
On 3/29/24 12:18 PM, Jordan Rife wrote:
diff --git a/tools/testing/selftests/bpf/sock_addr_helpers.c
b/tools/testing/selftests/bpf/sock_addr_helpers.c
new file mode 100644
index 0..ff2eb09870f16
--- /dev/null
+++ b/tools/testing/selftests/bpf/sock_addr_helpers.c
@@ -0,0 +1,46 @@
+//
On Tue, Apr 02, 2024, Maxim Levitsky wrote:
> Kind ping on this patch.
It (and patches from other folks that are getting pinged) is on my list of
things
to grab, I'm still digging myself out of my mailbox and time sensitive things
that
cropped up while I was offline. I expect to start applying
Jakub Kicinski writes:
> On Tue, 2 Apr 2024 18:37:44 +0200 Petr Machata wrote:
>> Yeah, this would be usually done through context managers, as I mention
>> in the other e-mail. But then cfg would be lexically scoped, which IMHO
>> is a good thing, but then it needs to be passed around as an ar
On 3/29/24 12:18 PM, Jordan Rife wrote:
+int recvmsg_from_client(int sockfd, struct sockaddr_storage *src_addr)
+{
+ struct timeval tv;
+ struct msghdr hdr;
+ struct iovec iov;
+ char data[64];
+ fd_set rfds;
+
+ FD_ZERO(&rfds);
+ FD_SET(sockfd, &rfds);
+
kselftest/next kselftest-livepatch: 1 runs, 1 regressions
(v6.9-rc1-11-ge1e4db64728f8)
Regressions Summary
---
platform| arch | lab | compiler | defconfig
| regressions
+--+---+--+--
Jakub Kicinski writes:
> On Tue, 2 Apr 2024 10:31:11 -0700 Jakub Kicinski wrote:
>> Yes, I was wondering about that. It must be doable, IIRC
>> the multi-threading API "injects" args from a tuple.
>> I was thinking something along the lines of:
>>
>> with NetDrvEnv(__file__) as cfg:
>>
kselftest/next build: 4 builds: 0 failed, 4 passed, 1 warning
(v6.9-rc1-11-ge1e4db64728f8)
Full Build Summary:
https://kernelci.org/build/kselftest/branch/next/kernel/v6.9-rc1-11-ge1e4db64728f8/
Tree: kselftest
Branch: next
Git Describe: v6.9-rc1-11-ge1e4db64728f8
Git Commit: e1e4db64728f8f43c6
Hello Michal,
On 4/2/24 18:16, Michal Koutný wrote:
> Hello.
>
> On Wed, Mar 27, 2024 at 11:53:22PM +0100, Djalal Harouni
> wrote:
>> ...
>> For some cases we want to freeze the cgroup of a task based on some
>> signals, doing so from bpf is better than user space which could be
>> too late.
>
Martin and Andrii,
> This function can be made as a new kfunc in bpf_testmod.c. The
> sock_create_kern() could be moved to here also. Take a look at the
> register_btf_kfunc_id_set() usage in bpf_testmod.c and how those registered
> kfunc(s) can be called by the bpf prog in progs/*.
Thanks for th
On 3/29/24 12:18 PM, Jordan Rife wrote:
+static int do_sock_op(int op, struct sockaddr *addr, int addrlen)
This function can be made as a new kfunc in bpf_testmod.c. The
sock_create_kern() could be moved to here also. Take a look at the
register_btf_kfunc_id_set() usage in bpf_testmod.c and h
On Tue, 2 Apr 2024 10:31:11 -0700 Jakub Kicinski wrote:
> Yes, I was wondering about that. It must be doable, IIRC
> the multi-threading API "injects" args from a tuple.
> I was thinking something along the lines of:
>
> with NetDrvEnv(__file__) as cfg:
> ksft_run([check_pause, check_
Hello,
On 3/30/24 00:04, Alexei Starovoitov wrote:
> On Fri, Mar 29, 2024 at 2:39 PM Tejun Heo wrote:
>>
>> Hello,
>>
>> On Fri, Mar 29, 2024 at 02:22:28PM +0100, Djalal Harouni wrote:
>>> It would be easy at least for me if I just start with cgroupv2 and
>>> ensure that it has same available fil
On Tue, 2 Apr 2024 18:37:44 +0200 Petr Machata wrote:
> Yeah, this would be usually done through context managers, as I mention
> in the other e-mail. But then cfg would be lexically scoped, which IMHO
> is a good thing, but then it needs to be passed around as an argument,
> and that makes the ksf
On Tue, 2 Apr 2024 17:53:41 +0200 Petr Machata wrote:
> > +def ksft_ge(a, b, comment=""):
> > +global KSFT_RESULT
> > +if a < b:
> > +KSFT_RESULT = False
>
> Hmm, instead of this global KSFT_RESULT business, have you considered
> adding and raising an XsftFailEx, like for the oth
On Tue, Apr 2, 2024 at 7:57 AM Thomas Gleixner wrote:
> On Mon, Apr 01 2024 at 13:17, John Stultz wrote:
> > This change does seem to cherry-pick cleanly back to at least
> > stable/linux-5.10.y cleanly, so it looks simple to pull this change
> > back. But I wanted to make sure there wasn't anythi
On Sun, Mar 31, 2024 at 11:59:06AM +0100, Marc Zyngier wrote:
> Mark Brown wrote:
> > The 2023 architecture extensions have allocated some new ID registers, add
> > them to the KVM system register descriptions so that they are visible to
> > guests.
> > We make the newly introduced dpISA feature
Jakub Kicinski writes:
> Add glue code for accessing the YNL library which lives under
> tools/net and YAML spec files from under Documentation/.
> Automatically figure out if tests are run in tree or not.
> Since we'll want to use this library both from net and
> drivers/net test targets make
Hello.
On Wed, Mar 27, 2024 at 11:53:22PM +0100, Djalal Harouni
wrote:
> ...
> For some cases we want to freeze the cgroup of a task based on some
> signals, doing so from bpf is better than user space which could be
> too late.
Notice that freezer itself is not immediate -- tasks are frozen as
Jakub Kicinski writes:
> Add a very simple test to make sure drivers report expected
> stats. Drivers which implement FEC or pause configuration
> should report relevant stats. Qstats must be reported,
> at least packet and byte counts, and they must match
> total device stats.
>
> Tested with
On Tue, Apr 02, 2024 at 03:53:33PM +0100, Marc Zyngier wrote:
> Mark Brown wrote:
> > Sure, those patches are still in flight though. It does seem reasonable
> > to target the current code.
> Sure, if your intent is for this code not to be merged.
> Because it means this series assumes a diffe
David Gow writes:
> On Wed, 20 Mar 2024 at 16:18, Kemeng Shi wrote:
>>
>> There is no KUNIT_VERY_SLOW, I guess we mean KUNIT_SPEED_VERY_SLOW.
>>
>> Signed-off-by: Kemeng Shi
>> ---
>
> Nice catch, thanks!
>
> Reviewed-by: David Gow
Let me know if you'd like me to pick this up; otherwise I'm a
On 4/2/24 10:13, Michal Koutný wrote:
Hello Waiman.
(I have no opinion on the overall locking reworks, only the bits about
v1 migrations caught my attention.)
On Mon, Apr 01, 2024 at 10:58:57AM -0400, Waiman Long
wrote:
...
@@ -4383,12 +4377,20 @@ hotplug_update_tasks_legacy(struct cpuset
Yonghong Song,
Thank you so much for replying. I was missing how to run pipeline manually.
Thanks a ton.
On 4/1/24 11:53 PM, Yonghong Song wrote:
>
> On 4/1/24 5:34 AM, Muhammad Usama Anjum wrote:
>> Move test_dev_cgroup.c to prog_tests/dev_cgroup.c to be able to run it
>> with test_progs. Repla
On Mon, Apr 01 2024 at 13:17, John Stultz wrote:
> Apologies for drudging up this old thread.
> I wanted to ask if anyone had objections to including this in the -stable
> trees?
>
> After this and the follow-on patch e797203fb3ba
> ("selftests/timers/posix_timers: Test delivery of signals across
On Tue, 02 Apr 2024 15:34:27 +0100,
Mark Brown wrote:
>
> [1 ]
> On Sun, Mar 31, 2024 at 11:00:41AM +0100, Marc Zyngier wrote:
> > Mark Brown wrote:
>
> > > As part of the lazy FPSIMD state transitioning done by the hypervisor we
> > > currently share the userpsace FPSIMD state in thread->uw.f
On Sun, Mar 31, 2024 at 11:00:41AM +0100, Marc Zyngier wrote:
> Mark Brown wrote:
> > As part of the lazy FPSIMD state transitioning done by the hypervisor we
> > currently share the userpsace FPSIMD state in thread->uw.fpsimd_state with
> > the host. Since this struct is non-extensible userspace
Hello Waiman.
(I have no opinion on the overall locking reworks, only the bits about
v1 migrations caught my attention.)
On Mon, Apr 01, 2024 at 10:58:57AM -0400, Waiman Long
wrote:
...
> @@ -4383,12 +4377,20 @@ hotplug_update_tasks_legacy(struct cpuset *cs,
> /*
>* Move tasks to
On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote:
> This is the first patch to enable the base extension selftest
> for the SBI implementation in KVM. Test for other extensions
> will be added later.
I'm not sure we want SBI tests in KVM selftests since we already
plan to add them to kvm-u
On Fri, 2024-03-15 at 10:35 -0400, Maxim Levitsky wrote:
> max_guest_memory_test uses ucalls to sync with the host, but
> it also resets the guest RIP back to its initial value in between
> tests stages.
>
> This makes the guest never reach the code which frees the ucall struct
> and since a fixed
It seems obvious once you know, but at first I didn't realise that the
suite name is part of this format. Document it and add some examples.
Signed-off-by: Brendan Jackman
---
v1->v2: Expanded to clarify that suite_glob and test_glob are two separate
patterns. Also made some other trivial
On Tue, 2 Apr 2024, Saasha Gupta wrote:
> Date: Mon, 2 Apr 2024 19:59:56 +0530
>
> RE: This patch is now properly preformatted.
>
> Landlock LSM, a part of the security subsystem, has some tests in place
> for synthetic filesystems such as tmpfs, proc, sysfs, etc. The goal of
> the new issue, a
On Tue, 2 Apr 2024, Saasha Gupta wrote:
> Date: Mon, 2 Apr 2024 19:59:56 +0530
Not clear why this is part of the message.
> RE: This patch is now properly preformatted.
Such a comment belongs below the ---. People who look at the history of
the file in the git logs have no idea that the pat
On Wed, Mar 27, 2024 at 06:05:46PM -0600, Shuah Khan wrote:
> ASSERT_*() is supposed to exit the test right away. If this
> isn't happening it needs to be debugged.
We know it doesn't work in setup/teardown functions, you can see it in
the code it jumps back and does the teardown again in an inf
On Thu, 28 Mar 2024 at 19:27, Daniel Latypov wrote:
> This current wording and examples (before and after this change) might
> make the user think otherwise, i.e. that it works like
> effective_name = suite_name + '.' + test_name
> return glob_matches(effective_name, filter_glob)
>
> E.g. give
On Mon, 1 Apr 2024 at 22:17, John Stultz wrote:
>
> On Thu, Mar 16, 2023 at 5:30 AM Marco Elver wrote:
> >
> > From: Dmitry Vyukov
> >
> > POSIX timers using the CLOCK_PROCESS_CPUTIME_ID clock prefer the main
> > thread of a thread group for signal delivery. However, this has a
> > significa
On 3/2/24 03:00, Andrew Jones wrote:
On Wed, Feb 28, 2024 at 05:01:27PM -0800, Atish Patra wrote:
The SBI PMU extension definition is required for upcoming SBI PMU
selftests.
Signed-off-by: Atish Patra
---
.../selftests/kvm/include/riscv/processor.h | 67 +++
1 file change
On 3/2/24 04:35, Andrew Jones wrote:
On Wed, Feb 28, 2024 at 05:01:30PM -0800, Atish Patra wrote:
Add a test for verifying overflow interrupt. Currently, it relies on
overflow support on cycle/instret events. This test works for cycle/
instret events which support sampling via hpmcounters on the
On 3/2/24 04:13, Andrew Jones wrote:
On Wed, Feb 28, 2024 at 05:01:29PM -0800, Atish Patra wrote:
Verify PMU snapshot functionality by setting up the shared memory
correctly and reading the counter values from the shared memory
instead of the CSR.
Signed-off-by: Atish Patra
---
.../selftests
On Sat, Mar 2, 2024 at 3:52 AM Andrew Jones wrote:
>
> On Wed, Feb 28, 2024 at 05:01:28PM -0800, Atish Patra wrote:
> > This test implements basic sanity test and cycle/instret event
> > counting tests.
> >
> > Signed-off-by: Atish Patra
> > ---
> > tools/testing/selftests/kvm/Makefile|
On 3/2/24 02:33, Andrew Jones wrote:
On Wed, Feb 28, 2024 at 05:01:24PM -0800, Atish Patra wrote:
KVM enables perf for guest via counter virtualization. However, the
sampling can not be supported as there is no mechanism to enabled
trap/emulate scountovf in ISA yet. Rely on the SBI PMU snapshot
There is a spelling mistake in a ksft_test_result_skip message. Fix it.
Signed-off-by: Colin Ian King
---
tools/testing/selftests/mm/ksm_functional_tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c
b/tools/testing/selft
Date: Mon, 2 Apr 2024 19:59:56 +0530
RE: This patch is now properly preformatted.
Landlock LSM, a part of the security subsystem, has some tests in place
for synthetic filesystems such as tmpfs, proc, sysfs, etc. The goal of
the new issue, and hence this patch is to add tests for non synthetic
fi
76 matches
Mail list logo