Re: [PATCH net-next v7 6/6] selftests: drv-net: extend so_txtime with hw offload
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2026-09-01 03:03:39
Willem de Bruijn wrote:
From: Willem de Bruijn <willemb@google.com> Add two pacing hardware offload variants 1. one that uses FQ to safely offload when within bounds. 2. one that uses pfifo_fast and thus forwards all packets. Verify that the packets are paced in hardware with new flag '-H'. Also increase rcvtimeout significantly to reduce flakiness. Especially for the new beyond_hw_horizon test, which is close to the 100ms limit. But update recv_verify_empty to take MSG_DONTWAIT. That last empty check must not delay each testcase by the receive timeout. Hardware pacing offload can complete packets out of order. So the reverse_order test is expected to pass with pfifo_fast too. Do not test ETF, which does not change its dequeue behavior based on pacing_offload_horizon. Signed-off-by: Willem de Bruijn <willemb@google.com>
+@ksft_variants(_test_variants_fq()) +def test_so_txtime_pfifofast_mono_hw(cfg, ipver, args_tx, args_rx): + """Run all variants of monotonic tests, without fq pacing sw backup.""" + cfg.require_ipver(ipver) + cfg.require_nsim(nsim_test=False) + + _dev_setup_pacing_offload(cfg) + _qdisc_setup(cfg.ifname, "pfifo_fast") + + # Expect all tests to pass, except beyond_hw_horizon without sw fallback. + # It will send immediately, failing the receiver arrival bounds check. + expect_pass = not args_tx == "a,70"
Will fix a style warning
+ test_so_txtime(cfg, "mono", ipver, f"-H {args_tx}", args_rx, expect_pass)