[V1] tests/vhost_virtio_user_interrupt:add allow pci params when start testpmd

Message ID 20210220054924.1106111-1-weix.ling@intel.com (mailing list archive)
State Superseded
Headers
Series [V1] tests/vhost_virtio_user_interrupt:add allow pci params when start testpmd |

Commit Message

Ling, WeiX Feb. 20, 2021, 5:49 a.m. UTC
  Add allow pci params when start testpmd to fix tester and dut

in the same server dts can't run normally issue.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_vhost_virtio_user_interrupt.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
  

Comments

Ling, WeiX Feb. 20, 2021, 6:16 a.m. UTC | #1
Tested-by: Wei Ling <weix.ling@intel.com>

Regards,
Ling Wei

> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Saturday, February 20, 2021 01:49 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] tests/vhost_virtio_user_interrupt:add allow pci
> params when start testpmd
  
Zhao, HaiyangX Feb. 20, 2021, 7:06 a.m. UTC | #2
Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: Saturday, February 20, 2021 14:17
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt:add allow pci
> params when start testpmd
> 
> Tested-by: Wei Ling <weix.ling@intel.com>
> 
> Regards,
> Ling Wei
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Saturday, February 20, 2021 01:49 PM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] tests/vhost_virtio_user_interrupt:add allow
> > pci params when start testpmd
  

Patch

diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py
index 9f89c460..1142a435 100644
--- a/tests/TestSuite_vhost_virtio_user_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
@@ -127,17 +127,21 @@  class TestVirtioUserInterrupt(TestCase):
         testcmd = self.app_testpmd_path + " "
         vdev = ["net_vhost0,iface=vhost-net,queues=1,client=0"]
         para = " -- -i --rxq=1 --txq=1"
+        allow_pci = [self.pci_info]
+        if dmas:
+            for item in self.used_cbdma:
+                allow_pci.append(item)
         if len(pci) == 0:
             if dmas:
                 vdev = ["net_vhost0,iface=vhost-net,queues=1,dmas=[%s]" % dmas]
-                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, vdevs=vdev)
+                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=allow_pci, vdevs=vdev)
             else:
-                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=[self.pci_info], vdevs=vdev)
+                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=allow_pci, vdevs=vdev)
         else:
             if dmas:
                 vdev = ["net_vhost0,iface=vhost-net,queues=1,client=0,dmas=[%s]" % dmas]
                 para = " -- -i"
-                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=pci, prefix='vhost', vdevs=vdev)
+                eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=allow_pci, prefix='vhost', vdevs=vdev)
             else:
                 eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, prefix='vhost', no_pci=True, vdevs=vdev)
         cmd_vhost_user = testcmd + eal_params + para