File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
tools/testing/selftests/drivers/net/hw Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1313from lib .py import NetDrvEnv
1414
1515
16+ def _require_2qs (cfg ):
17+ qcnt = len (glob .glob (f"/sys/class/net/{ cfg .ifname } /queues/rx-*" ))
18+ if qcnt < 2 :
19+ raise KsftSkipEx (f"Local has only { qcnt } queues" )
20+ return qcnt
21+
22+
1623def _ethtool_create (cfg , act , opts ):
1724 output = ethtool (f"{ act } { cfg .ifname } { opts } " ).stdout
1825 # Output will be something like: "New RSS context is 1" or
@@ -57,10 +64,7 @@ def test_rxfh_indir_ntf(cfg):
5764 Check that Netlink notifications are generated when RSS indirection
5865 table was modified.
5966 """
60-
61- qcnt = len (glob .glob (f"/sys/class/net/{ cfg .ifname } /queues/rx-*" ))
62- if qcnt < 2 :
63- raise KsftSkipEx (f"Local has only { qcnt } queues" )
67+ _require_2qs (cfg )
6468
6569 ethnl = EthtoolFamily ()
6670 ethnl .ntf_subscribe ("monitor" )
@@ -88,10 +92,7 @@ def test_rxfh_indir_ctx_ntf(cfg):
8892 Check that Netlink notifications are generated when RSS indirection
8993 table was modified on an additional RSS context.
9094 """
91-
92- qcnt = len (glob .glob (f"/sys/class/net/{ cfg .ifname } /queues/rx-*" ))
93- if qcnt < 2 :
94- raise KsftSkipEx (f"Local has only { qcnt } queues" )
95+ _require_2qs (cfg )
9596
9697 ctx_id = _ethtool_create (cfg , "-X" , "context new" )
9798 defer (ethtool , f"-X { cfg .ifname } context { ctx_id } delete" )
You can’t perform that action at this time.
0 commit comments