[dts] [PATCH V1 1/2] tests/dpdk_gro_lib: add allow pci parameter when start testpmd

Ling Wei weix.ling at intel.com
Mon Mar 29 07:28:08 CEST 2021


1.Add allow pci parameter when start testpmd to support tester
  and dut in the same server.
2.Fix dpdk_gro_lib suite execute done not unbind nic to kernel issue.

Signed-off-by: Ling Wei <weix.ling at intel.com>
---
 tests/TestSuite_dpdk_gro_lib.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index 37d2faa6..efd04ffd 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -164,7 +164,7 @@ class TestDPDKGROLib(TestCase):
             self.vhost_user = self.dut.new_session(suite="user")
             self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
         else:
-            eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=%s' % (self.base_dir, queue)])
+            eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=%s' % (self.base_dir, queue)], ports=[self.pci])
             self.testcmd_start = self.path + eal_param + " -- -i  --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
             self.vhost_user = self.dut.new_session(suite="user")
             self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
@@ -485,3 +485,5 @@ class TestDPDKGROLib(TestCase):
         """
         self.unprepare_dpdk()
         self.dut.send_expect("ip netns del ns1", "# ", 30)
+        self.dut.send_expect("./usertools/dpdk-devbind.py -u %s" % (self.pci), '# ', 30)
+        self.dut.send_expect("./usertools/dpdk-devbind.py -b %s %s" % (self.pci_drv, self.pci), '# ', 30)
-- 
2.25.1



More information about the dts mailing list