summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-06-09 02:00:12 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-09 02:00:12 +0300
commit1e127c94fa11cd55c8495c4b13bb255094683b4c (patch)
treea93d922195a5a47123e7af3a50c18b761bd92c56 /tools
parent1bf20cc62a54f95db32529871534751fb6b1b73c (diff)
parentb016022b127fc2949f79c350817c458a060314e4 (diff)
downloadlinux-1e127c94fa11cd55c8495c4b13bb255094683b4c.tar.xz
Merge branch 'so_txtime-improvements'
Willem de Bruijn says: ==================== SO_TXTIME improvements FQ targets monotonic timestamps as generated by the TCP stack. But SO_TXTIME was later added, which can send skbs with timestamps against other clocks. It is now possible to detect these through skb tstamp_type. Make FQ robust by converting these timestamps for use in FQ (patch 2). This also requires testing against out-of-bounds values. Prefer to do this at the source, when parsing SCM_TXTIME (patch 1). But, tests in the hot path are still needed, to handle BPF sources. Extend the so_txtime selftest to handle this new case (patch 3). v1: https://lore.kernel.org/20260603190243.2789335-1-willemdebruijn.kernel@gmail.com ==================== Link: https://patch.msgid.link/20260604194221.3319080-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/drivers/net/so_txtime.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/testing/selftests/drivers/net/so_txtime.py b/tools/testing/selftests/drivers/net/so_txtime.py
index 5d4388bfc6dd..b7be4cabbec2 100755
--- a/tools/testing/selftests/drivers/net/so_txtime.py
+++ b/tools/testing/selftests/drivers/net/so_txtime.py
@@ -46,7 +46,7 @@ def _qdisc_setup(ifname, qdisc, optargs=""):
tc(f"qdisc replace dev {ifname} root {qdisc} {optargs}")
-def _test_variants_mono():
+def _test_variants_fq():
for ipver in ["4", "6"]:
for testcase in [
["no_delay", "a,-1", "a,-1"],
@@ -59,13 +59,20 @@ def _test_variants_mono():
yield KsftNamedVariant(name, ipver, testcase[1], testcase[2])
-@ksft_variants(_test_variants_mono())
-def test_so_txtime_mono(cfg, ipver, args_tx, args_rx):
+@ksft_variants(_test_variants_fq())
+def test_so_txtime_fq_mono(cfg, ipver, args_tx, args_rx):
"""Run all variants of monotonic (fq) tests."""
_qdisc_setup(cfg.ifname, "fq")
test_so_txtime(cfg, "mono", ipver, args_tx, args_rx, True)
+@ksft_variants(_test_variants_fq())
+def test_so_txtime_fq_tai(cfg, ipver, args_tx, args_rx):
+ """Run all variants of fq tests, but pass CLOCK_TAI to test conversion."""
+ _qdisc_setup(cfg.ifname, "fq")
+ test_so_txtime(cfg, "tai", ipver, args_tx, args_rx, True)
+
+
def _test_variants_etf():
for ipver in ["4", "6"]:
for testcase in [
@@ -95,7 +102,10 @@ def test_so_txtime_etf(cfg, ipver, args_tx, args_rx, expect_fail):
def main() -> None:
"""Boilerplate ksft main."""
with NetDrvEpEnv(__file__) as cfg:
- ksft_run([test_so_txtime_mono, test_so_txtime_etf], args=(cfg,))
+ ksft_run(
+ [test_so_txtime_fq_mono, test_so_txtime_fq_tai, test_so_txtime_etf],
+ args=(cfg,),
+ )
ksft_exit()