@@ -77,7 +77,7 @@ class TestSoftnic(TestCase):
self.dut.session.copy_file_to(self.nat_firmware, self.root_path)
self.eal_param = " -w %s" % self.dut.ports_info[0]['pci']
self.path = self.dut.apps_name['test-pmd']
- self.cmd = "./%s -c 0x7 -s 0x4 -n 4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x2"
+ self.pmdout = PmdOutput(self.dut)
# get dts output path
if self.logger.log_path.startswith(os.sep):
self.output_path = self.logger.log_path
@@ -103,7 +103,9 @@ class TestSoftnic(TestCase):
# 10G nic pps(M)
expect_pps = [14, 8, 4, 2, 1, 0.9, 0.8]
- self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'firmware.cli'), "testpmd>", timeout=800)
+ self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2",
+ eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'"
+ % (self.eal_param, 'firmware.cli'))
self.dut.send_expect("start", "testpmd>")
rx_port = self.tester.get_local_port(0)
tx_port = self.tester.get_local_port(0)
@@ -128,7 +130,9 @@ class TestSoftnic(TestCase):
def test_perf_shaping_for_pipe(self):
self.change_config_file('tm_firmware.cli')
- self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'tm_firmware.cli'), "testpmd> ", timeout=800)
+ self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2",
+ eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'"
+ % (self.eal_param, 'tm_firmware.cli'))
self.dut.send_expect("start", "testpmd>")
rx_port = self.tester.get_local_port(0)
pkts = ["Ether(dst='%s')/IP(dst='100.0.0.0')/UDP()/Raw(load='x'*(64 - %s))", "Ether(dst='%s')/IP(dst='100.0.15.255')/UDP()/Raw(load='x'*(64 - %s))", "Ether(dst='%s')/IP(dst='100.0.4.0')/UDP()/Raw(load='x'*(64 - %s))"]
@@ -167,7 +171,9 @@ class TestSoftnic(TestCase):
for t in pkt_type:
for i in range(2):
self.dut.send_expect("sed -i -e '12c table action profile AP0 ipv4 offset 270 fwd nat %s proto %s' %s" % (pkt_location[i], t, self.root_path + 'nat_firmware.cli'), "#")
- self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'nat_firmware.cli'), "testpmd>", timeout=60)
+ self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2",
+ eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'" % (
+ self.eal_param, 'nat_firmware.cli'))
self.dut.send_expect("start", "testpmd>")
# src ip tcp
for j in range(2):
Signed-off-by: Zhou Jun <junx.w.zhou@intel.com> --- tests/TestSuite_softnic.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)