Skip to content

Commit 27b0286

Browse files
committed
Merge branch 'selftest-net-add-selftest-for-netpoll'
Breno Leitao says: ==================== selftest: net: Add selftest for netpoll 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/[email protected]/ [1] ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 6c628ed + b301934 commit 27b0286

File tree

4 files changed

+434
-2
lines changed

4 files changed

+434
-2
lines changed

tools/testing/selftests/drivers/net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ TEST_PROGS := \
1616
netcons_fragmented_msg.sh \
1717
netcons_overflow.sh \
1818
netcons_sysdata.sh \
19+
netpoll_basic.py \
1920
ping.py \
2021
queues.py \
2122
stats.py \

tools/testing/selftests/drivers/net/lib/py/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from net.lib.py import EthtoolFamily, NetdevFamily, NetshaperFamily, \
1515
NlError, RtnlFamily, DevlinkFamily
1616
from net.lib.py import CmdExitFailure
17-
from net.lib.py import bkg, cmd, defer, ethtool, fd_read_timeout, ip, \
18-
rand_port, tool, wait_port_listen, bpftool
17+
from net.lib.py import bkg, cmd, bpftool, bpftrace, defer, ethtool, \
18+
fd_read_timeout, ip, rand_port, tool, wait_port_listen
1919
from net.lib.py import fd_read_timeout
2020
from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
2121
from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \

0 commit comments

Comments
 (0)