mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
selftests: drv-net: add tests for napi IRQ affinity notifiers
Add tests to check that the napi retained the IRQ after down/up,
multiple changes in the number of rx queues and after
attaching/releasing XDP program.
Tested on ice and idpf:
# NETIF=<iface> tools/testing/selftests/drivers/net/hw/irq.py
KTAP version 1
1..4
ok 1 irq.check_irqs_reported
ok 2 irq.check_reconfig_queues
ok 3 irq.check_reconfig_xdp
ok 4 irq.check_down
# Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
Tested-by: Ahmed Zaki <ahmed.zaki@intel.com>
Link: https://patch.msgid.link/20250224232228.990783-7-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -58,14 +58,20 @@ class NetDrvEnv(NetDrvEnvBase):
|
||||
"""
|
||||
Class for a single NIC / host env, with no remote end
|
||||
"""
|
||||
def __init__(self, src_path, **kwargs):
|
||||
def __init__(self, src_path, nsim_test=None, **kwargs):
|
||||
super().__init__(src_path)
|
||||
|
||||
self._ns = None
|
||||
|
||||
if 'NETIF' in self.env:
|
||||
if nsim_test is True:
|
||||
raise KsftXfailEx("Test only works on netdevsim")
|
||||
|
||||
self.dev = ip("-d link show dev " + self.env['NETIF'], json=True)[0]
|
||||
else:
|
||||
if nsim_test is False:
|
||||
raise KsftXfailEx("Test does not work on netdevsim")
|
||||
|
||||
self._ns = NetdevSimDev(**kwargs)
|
||||
self.dev = self._ns.nsims[0].dev
|
||||
self.ifname = self.dev['ifname']
|
||||
|
||||
Reference in New Issue
Block a user