From: Simon Horman <horms@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
bpf@vger.kernel.org, gustavold@gmail.com,
Stanislav Fomichev <sdf@fomichev.me>
Subject: Re: [PATCH net-next v2 0/4] selftest: net: Add selftest for netpoll
Date: Wed, 25 Jun 2025 19:43:46 +0100 [thread overview]
Message-ID: <20250625184346.GM1562@horms.kernel.org> (raw)
In-Reply-To: <20250625-netpoll_test-v2-0-47d27775222c@debian.org>
+ Stan
On Wed, Jun 25, 2025 at 04:39:45AM -0700, Breno Leitao wrote:
> I am submitting a new selftest for the netpoll subsystem specifically
> targeting the case where the RX is polling in the TX path, which is
> a case that we don't have any test in the tree today. This is done when
> netpoll_poll_dev() called, and this test creates a scenario when that is
> probably.
>
> The test does the following:
>
> 1) Configuring a single RX/TX queue to increase contention on the
> interface.
> 2) Generating background traffic to saturate the network, mimicking
> real-world congestion.
> 3) Sending netconsole messages to trigger netpoll polling and monitor
> its behavior.
> 4) Using dynamic netconsole targets via configfs, with the ability to
> delete and recreate targets during the test.
> 5) Running bpftrace in parallel to verify that netpoll_poll_dev() is
> called when expected. If it is called, then the test passes,
> otherwise the test is marked as skipped.
>
> In order to achieve it, I stole Jakub's bpftrace helper from [1], and
> did some small changes that I found useful to use the helper.
>
> So, this patchset basically contains:
>
> 1) The code stolen from Jakub
> 2) Improvements on bpftrace() helper
> 3) The selftest itself
>
> Link: https://lore.kernel.org/all/20250421222827.283737-22-kuba@kernel.org/ [1]
Jakub, Stan, all,
It looks like bpftrace needs to be installed on the CI workers.
Currently they report something a lot like this:
# timeout set to 180
# selftests: drivers/net: netpoll_basic.py
# Exception in thread Thread-1:
# Traceback (most recent call last):
# File "/usr/lib64/python3.9/threading.py", line 980, in _bootstrap_inner
# self.run()
# File "/usr/lib64/python3.9/threading.py", line 917, in run
# self._target(*self._args, **self._kwargs)
# File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./netpoll_basic.py", line 198, in bpftrace_call
# MAPS = bpftrace(expr, timeout=BPFTRACE_TIMEOUT, json=True)
# File "/home/virtme/testing-17/tools/testing/selftests/net/lib/py/utils.py", line 205, in bpftrace
# cmd_obj = cmd(cmd_arr, ns=ns, host=host, shell=False)
# File "/home/virtme/testing-17/tools/testing/selftests/net/lib/py/utils.py", line 60, in __init__
# self.proc = subprocess.Popen(comm, shell=shell, stdout=subprocess.PIPE,
# File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
# self._execute_child(args, executable, preexec_fn, close_fds,
# File "/usr/lib64/python3.9/subprocess.py", line 1837, in _execute_child
# raise child_exception_type(errno_num, err_msg, err_filename)
# FileNotFoundError: [Errno 2] No such file or directory: 'bpftrace'
# TAP version 13
# 1..1
# # Exception| Traceback (most recent call last):
# # Exception| File "/home/virtme/testing-17/tools/testing/selftests/net/lib/py/ksft.py", line 243, in ksft_run
# # Exception| case(*args)
# # Exception| File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./netpoll_basic.py", line 308, in test_netpoll
# # Exception| do_netpoll_flush_monitored(cfg, netdevnl, ifname, target_name)
# # Exception| File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./netpoll_basic.py", line 243, in do_netpoll_flush_monitored
# # Exception| do_netpoll_flush(cfg, netdevnl, ifname, target_name)
# # Exception| File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./netpoll_basic.py", line 278, in do_netpoll_flush
# # Exception| if bpftrace_any_hit(join=False):
# # Exception| File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./netpoll_basic.py", line 230, in bpftrace_any_hit
# # Exception| raise KsftFailEx(f"bpftrace failed to run!?: {MAPS}")
# # Exception| net.lib.py.ksft.KsftFailEx: bpftrace failed to run!?: {}
# not ok 1 netpoll_basic.test_netpoll
# # Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0
next prev parent reply other threads:[~2025-06-25 18:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 11:39 [PATCH net-next v2 0/4] selftest: net: Add selftest for netpoll Breno Leitao
2025-06-25 11:39 ` [PATCH net-next v2 1/4] selftests: drv-net: add helper/wrapper for bpftrace Breno Leitao
2025-06-25 22:12 ` Jakub Kicinski
2025-06-25 11:39 ` [PATCH net-next v2 2/4] selftests: drv-net: Improve bpftrace utility error handling Breno Leitao
2025-06-25 21:48 ` Jakub Kicinski
2025-06-26 13:11 ` Breno Leitao
2025-06-25 11:39 ` [PATCH net-next v2 3/4] selftests: drv-net: Strip '@' prefix from bpftrace map keys Breno Leitao
2025-06-25 22:07 ` Jakub Kicinski
2025-06-26 13:04 ` Breno Leitao
2025-06-25 11:39 ` [PATCH net-next v2 4/4] selftests: net: add netpoll basic functionality test Breno Leitao
2025-06-25 22:09 ` Jakub Kicinski
2025-06-26 10:31 ` Breno Leitao
2025-06-26 8:25 ` Simon Horman
2025-06-27 15:18 ` Breno Leitao
2025-06-26 16:31 ` Willem de Bruijn
2025-06-26 17:10 ` Breno Leitao
2025-06-25 18:43 ` Simon Horman [this message]
2025-06-25 21:46 ` [PATCH net-next v2 0/4] selftest: net: Add selftest for netpoll Jakub Kicinski
2025-06-26 8:17 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250625184346.GM1562@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavold@gmail.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.