Re: [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation

From
Jakub Kicinski <kuba@kernel.org>
Date
2026-10-23 01:24:48
Also in
bpf
Reply to
Maciej Fijalkowski, 2026-10-22
On Thu, 22 Oct 2026 17:44:14 +0200 Maciej Fijalkowski wrote:
quoted
Really not loving the amount of "library" code added here.
Do you need this just to run it over veth in net/ and over
real HW in drivers/net/ ? Are the test cases very different?  
Now that you bring this up, would be good to clarify expectations of this
work. The lib input is what veth and hw runners share to avoid code
repetition. The separation comes from a fact that we still want to cover
SKB and DRV modes (via veth at net/test_xsk.py) and ZC mode is covered by
drivers/net/hw/xsk.py.

My assumption was that would not hurt much to carry common code within lib
file. I might have been wrong tho.
We should try to avoid pushing things into lib whenever possible.
quoted
I wonder if we could solve this by parameterizing the env
class to use veth instead of netdevsim and then have unified tests?  
Tell me more regarding the unified tests. Is that okay'ish to run
veth-based tests from drivers/net/hw ? I thought it was not and I shared
my insights on similar work which does the same kind of migration
(xdp_features bpf->drivers/net/hw) and it seemed to be heavily veth
dedicated - the bpf sh runner was basically veth based, but so does the
xskxceiver and I moved away from this after Bjorn's input (turned out to
be a good thing).
The other way around. We can add mixed HW and non-HW tests in
drivers/net When run against non-HW we need to be careful to XFail
instead of failing or Skipping, so that SW CI "is green".
each runner can have single ksft_run() call, right? So, do you think
separate files for veth and hw runners is still okay?
SW and HW testing are done by separate executors. We'd have some
trouble (read: we'd need extra wrapping) if we we needed multiple 
envs for SW testing, but SW vs HW is easy. Executor will either
run with no env exports and get the SW test, or it will be exporting
$NETIF etc and test will run against $NETIF.
In veth runner I don't even instantiate NetDrvEpEnv as I have veth pair
being created 'manually', however having a param similar to existing
netdevsim one would be nice and xdp-features set could benefit from that
as well. 
Yup!
Thread (32 messages) 32 messages, 4 authors, last reply 16d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help