test suite reviews and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] tests/blocklist: Add support for NFP PMD
@ 2023-07-03 19:34 Niklas Söderlund
  2023-07-03 19:34 ` [PATCH 1/2] tests/blocklist: optimize logic to match more driver name of pmd Niklas Söderlund
  2023-07-03 19:34 ` [PATCH 2/2] tests/blocklist: optimize case of bl_one_port to adapt to more scenarios Niklas Söderlund
  0 siblings, 2 replies; 3+ messages in thread
From: Niklas Söderlund @ 2023-07-03 19:34 UTC (permalink / raw)
  To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund

Hi,

This series extends the blocklist test to support the NFP PMD. The qurik 
being that a NFP PMD can supply two ports from the same PCI location.

The first patch extends the matching for NFP driver name. While the 
second patch extends the test to allow to test two ports from the same 
PCI location.

Qin Ke (2):
  tests/blocklist: optimize logic to match more driver name of pmd
  tests/blocklist: optimize case of bl_one_port to adapt to more
    scenarios

 tests/TestSuite_blocklist.py | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] tests/blocklist: optimize logic to match more driver name of pmd
  2023-07-03 19:34 [PATCH 0/2] tests/blocklist: Add support for NFP PMD Niklas Söderlund
@ 2023-07-03 19:34 ` Niklas Söderlund
  2023-07-03 19:34 ` [PATCH 2/2] tests/blocklist: optimize case of bl_one_port to adapt to more scenarios Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2023-07-03 19:34 UTC (permalink / raw)
  To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund

From: Qin Ke <qin.ke@corigine.com>

Driver name of dpdk pmd can match net.*%s.*, not just net.*%s,
optimize it. For example, it is net_nfp_pf for nfp, not net_nfp.

Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by Dano Teixeira <dano.teixeira@corigine.com>
---
 tests/TestSuite_blocklist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/TestSuite_blocklist.py b/tests/TestSuite_blocklist.py
index 9aafc6fec2dc..9d12c8319b23 100644
--- a/tests/TestSuite_blocklist.py
+++ b/tests/TestSuite_blocklist.py
@@ -24,7 +24,7 @@ class TestBlockList(TestCase):
         self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
         [arch, machine, self.env, toolchain] = self.target.split("-")
         self.regexp_blocklisted_port = (
-            "Probe PCI driver: net.*%s \(%s\) device: .*%s \(socket [-0-9]+\)"
+            "Probe PCI driver: net.*%s.* \(%s\) device: .*%s \(socket [-0-9]+\)"
         )
         self.pmdout = PmdOutput(self.dut)
 
-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] tests/blocklist: optimize case of bl_one_port to adapt to more scenarios
  2023-07-03 19:34 [PATCH 0/2] tests/blocklist: Add support for NFP PMD Niklas Söderlund
  2023-07-03 19:34 ` [PATCH 1/2] tests/blocklist: optimize logic to match more driver name of pmd Niklas Söderlund
@ 2023-07-03 19:34 ` Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2023-07-03 19:34 UTC (permalink / raw)
  To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund

From: Qin Ke <qin.ke@corigine.com>

when one port blocked, the port with same PCIADRESS will also be blocked,
optimize it to adapt to more scenarios whether the PCIADRESS of ports are
same or not.

Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by Dano Teixeira <dano.teixeira@corigine.com>
---
 tests/TestSuite_blocklist.py | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_blocklist.py b/tests/TestSuite_blocklist.py
index 9d12c8319b23..61b5bf6800cd 100644
--- a/tests/TestSuite_blocklist.py
+++ b/tests/TestSuite_blocklist.py
@@ -78,10 +78,25 @@ class TestBlockList(TestCase):
         Run testpmd with one port blocklisted.
         """
         self.dut.kill_all()
+        blocked_pci_address = self.dut.ports_info[0]["pci"]
         out = self.pmdout.start_testpmd(
-            "Default", eal_param="-b %s" % self.dut.ports_info[0]["pci"]
+            "Default", eal_param="-b %s" % blocked_pci_address
         )
-        self.check_blocklisted_ports(out, self.ports[1:])
+
+        """
+        To multi-port NIC with one PCIADRESS, port has same PCIADRESS will also
+        be blocked when selected port blocked.
+        """
+        ports_to_blocklist = []
+        ports_no_blocklist = []
+        for port in self.ports:
+            if self.dut.ports_info[port]["pci"] == blocked_pci_address:
+                ports_to_blocklist.append(port)
+            else:
+                ports_no_blocklist.append(port)
+
+        self.check_blocklisted_ports(out, ports_to_blocklist, True)
+        self.check_blocklisted_ports(out, ports_no_blocklist)
 
     def test_bl_all_but_one_port_blocklisted(self):
         """
-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-03 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 19:34 [PATCH 0/2] tests/blocklist: Add support for NFP PMD Niklas Söderlund
2023-07-03 19:34 ` [PATCH 1/2] tests/blocklist: optimize logic to match more driver name of pmd Niklas Söderlund
2023-07-03 19:34 ` [PATCH 2/2] tests/blocklist: optimize case of bl_one_port to adapt to more scenarios Niklas Söderlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).