[V1,1/2] tests/*: Move Intel IOAT devices from Misc to DMA devices

Message ID 20211125131311.134679-2-linglix.chen@intel.com (mailing list archive)
State Accepted
Headers
Series move ioat device IDs to DMA class: change misc to dma. |

Commit Message

Lingli Chen Nov. 25, 2021, 1:13 p.m. UTC
  1. According to dpdk commit e6f6dda60a5f("usertools/devbind: move ioat device IDs to DMA class") change misc to dma.
2. Modify re.search('\s*(0000:\S*:\d*.\d*)', device) for some DMA
devices_info contains letter.
3. Cbdma only tests vfio-pci from 21.11, so remove igb_uio.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_cbdma.py                       |  4 +---
 tests/TestSuite_dpdk_gro_lib.py                |  8 ++------
 tests/TestSuite_vhost_cbdma.py                 |  7 ++-----
 tests/TestSuite_vhost_event_idx_interrupt.py   |  7 ++-----
 tests/TestSuite_vhost_user_interrupt.py        |  8 ++------
 tests/TestSuite_vhost_virtio_pmd_interrupt.py  |  7 ++-----
 tests/TestSuite_vhost_virtio_user_interrupt.py |  8 ++------
 tests/TestSuite_virtio_event_idx_interrupt.py  |  7 ++-----
 tests/TestSuite_vm2vm_virtio_net_perf.py       | 14 +++++---------
 tests/TestSuite_vm2vm_virtio_pmd.py            |  6 +-----
 tests/TestSuite_vm2vm_virtio_user.py           |  8 ++------
 tests/TestSuite_vswitch_sample_cbdma.py        |  6 +-----
 12 files changed, 24 insertions(+), 66 deletions(-)
  

Patch

diff --git a/tests/TestSuite_cbdma.py b/tests/TestSuite_cbdma.py
index b33290f7..08dc48af 100644
--- a/tests/TestSuite_cbdma.py
+++ b/tests/TestSuite_cbdma.py
@@ -91,12 +91,10 @@  class TestCBDMA(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        str_info = 'Misc (rawdev) devices using kernel driver'
         out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of dma dev, only add the device which
diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index e11bfd32..c1bfd936 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -114,14 +114,10 @@  class TestDPDKGROLib(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py
index 5ebd734f..c0cc772d 100644
--- a/tests/TestSuite_vhost_cbdma.py
+++ b/tests/TestSuite_vhost_cbdma.py
@@ -114,13 +114,10 @@  class TestVirTioVhostCbdma(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py
index 2d79f6b7..ef666b8a 100644
--- a/tests/TestSuite_vhost_event_idx_interrupt.py
+++ b/tests/TestSuite_vhost_event_idx_interrupt.py
@@ -281,14 +281,11 @@  class TestVhostEventIdxInterrupt(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
         self.cbdma_dev_infos = []
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 # dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_vhost_user_interrupt.py b/tests/TestSuite_vhost_user_interrupt.py
index c0d1b4f2..d8c7b043 100644
--- a/tests/TestSuite_vhost_user_interrupt.py
+++ b/tests/TestSuite_vhost_user_interrupt.py
@@ -112,14 +112,10 @@  class TestVhostUserInterrupt(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_vhost_virtio_pmd_interrupt.py b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
index 504266f8..b9798393 100644
--- a/tests/TestSuite_vhost_virtio_pmd_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
@@ -268,11 +268,8 @@  class TestVhostVirtioPmdInterrupt(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
-        cbdma_dev_infos = re.findall('\s*(0000:\d+:\d+.\d+)', out)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
+        cbdma_dev_infos = re.findall('\s*(0000:\S+:\d+.\d+)', out)
         self.verify(len(cbdma_dev_infos) >= cbdma_num, 'There no enough cbdma device to run this suite')
 
         used_cbdma = cbdma_dev_infos[0:cbdma_num]
diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py
index 4385681b..8c6e263f 100644
--- a/tests/TestSuite_vhost_virtio_user_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
@@ -185,14 +185,10 @@  class TestVirtioUserInterrupt(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py
index 2a1f7b26..40e8bb1e 100644
--- a/tests/TestSuite_virtio_event_idx_interrupt.py
+++ b/tests/TestSuite_virtio_event_idx_interrupt.py
@@ -89,11 +89,8 @@  class TestVirtioIdxInterrupt(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
-        cbdma_dev_infos = re.findall('\s*(0000:\d+:\d+.\d+)', out)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
+        cbdma_dev_infos = re.findall('\s*(0000:\S+:\d+.\d+)', out)
         self.verify(len(cbdma_dev_infos) >= cbdma_num, 'There no enough cbdma device to run this suite')
         used_cbdma = cbdma_dev_infos[0:cbdma_num]
         dmas_info = ''
diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py b/tests/TestSuite_vm2vm_virtio_net_perf.py
index 8c4b4ff2..dc8eaed5 100644
--- a/tests/TestSuite_vm2vm_virtio_net_perf.py
+++ b/tests/TestSuite_vm2vm_virtio_net_perf.py
@@ -87,14 +87,10 @@  class TestVM2VMVirtioNetPerf(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which on same socket with nic dev
@@ -113,11 +109,11 @@  class TestVM2VMVirtioNetPerf(TestCase):
         dmas_info = ''
         for dmas in used_cbdma[0:int(cbdma_num/2)]:
             number = used_cbdma[0:int(cbdma_num/2)].index(dmas)
-            dmas = 'txq{}@{},'.format(number, dmas.replace('0000:', ''))
+            dmas = 'txq{}@{},'.format(number, dmas)
             dmas_info += dmas
         for dmas in used_cbdma[int(cbdma_num/2):]:
             number = used_cbdma[int(cbdma_num/2):].index(dmas)
-            dmas = 'txq{}@{},'.format(number, dmas.replace('0000:', ''))
+            dmas = 'txq{}@{},'.format(number, dmas)
             dmas_info += dmas
         self.dmas_info = dmas_info[:-1]
         self.device_str = ' '.join(used_cbdma)
@@ -476,7 +472,7 @@  class TestVM2VMVirtioNetPerf(TestCase):
         self.vm_args = "disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on"
         self.prepare_test_env(cbdma=True, no_pci=False, client_mode=False, enable_queues=1, nb_cores=2,
                               server_mode=False, opt_queue=None, combined=False, rxq_txq=None)
-        self.start_iperf_and_verify_vhost_xstats_info(iperf_mode='ufo')
+        self.start_iperf_and_verify_vhost_xstats_info(iperf_mode='tso')
 
     def test_vm2vm_packed_ring_iperf_with_ufo(self):
         """
diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py
index cbb0321c..1ddf571b 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd.py
@@ -676,11 +676,7 @@  class TestVM2VMVirtioPMD(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "this case use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
             pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py
index 4b868b32..2b66af77 100644
--- a/tests/TestSuite_vm2vm_virtio_user.py
+++ b/tests/TestSuite_vm2vm_virtio_user.py
@@ -709,14 +709,10 @@  class TestVM2VMVirtioUser(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
-            pci_info = re.search('\s*(0000:\d*:\d*.\d*)', device)
+            pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)
             if pci_info is not None:
                 dev_info = pci_info.group(1)
                 # the numa id of ioat dev, only add the device which
diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index 81aede81..bd41135b 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -235,11 +235,7 @@  class TestVswitchSampleCBDMA(TestCase):
         """
         get all cbdma ports
         """
-        # check driver name in execution.cfg
-        self.verify(self.drivername == 'igb_uio',
-                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
-        str_info = 'Misc (rawdev) devices using kernel driver'
-        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
+        out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)
         device_info = out.split('\n')
         for device in device_info:
             pci_info = re.search('\s*(0000:\S*:\d*.\d*)', device)