From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9823837B4 for ; Sat, 20 Jan 2018 12:25:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jan 2018 03:25:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,385,1511856000"; d="scan'208";a="24925163" Received: from juan.sh.intel.com ([10.67.119.88]) by orsmga001.jf.intel.com with ESMTP; 20 Jan 2018 03:25:02 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Sun, 21 Jan 2018 04:00:32 +0800 Message-Id: <1516478432-140299-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH]tests: stop port when configure tx_vlan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2018 11:25:05 -0000 dpdk commit 597f9fafe13b ("app/testpmd: convert to new Tx offloads API"). This patch requires us to stop port when configure the TX offloads. Signed-off-by: Lijuan Tu --- tests/TestSuite_dual_vlan.py | 17 +++++++++++++++++ tests/TestSuite_vf_vlan.py | 3 +++ tests/TestSuite_vlan.py | 3 +++ 3 files changed, 23 insertions(+) diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py index d2eb79b..d0d7856 100644 --- a/tests/TestSuite_dual_vlan.py +++ b/tests/TestSuite_dual_vlan.py @@ -195,7 +195,11 @@ class TestDualVlan(TestCase): self.mode_config(strip=temp[0], filter=temp[1], qinq=temp[2]) if (caseDef & txCase) != 0: + self.dut.send_expect('stop', "testpmd> ") + self.dut.send_expect('port stop all', "testpmd> ") self.dut.send_expect('tx_vlan set %s %s' % (dutTxPortId, txvlan), "testpmd> ") + self.dut.send_expect('port start all', "testpmd> ") + self.dut.send_expect('start', "testpmd> ") configMode = "Strip %s, filter %s 0x1, extend %s, insert %s" % (temp[0], temp[1], temp[2], "on" if (caseDef & txCase) != 0 else "off") @@ -209,14 +213,23 @@ class TestDualVlan(TestCase): self.check_result(vlanCase[caseIndex][1], configMode + " result Error") self.dut.send_expect('rx_vlan rm %s %s' % (invlan, dutRxPortId), "testpmd> ") if (caseDef & txCase) != 0: + self.dut.send_expect('stop', "testpmd> ") + self.dut.send_expect('port stop all', "testpmd> ") self.dut.send_expect('tx_vlan reset %s' % dutTxPortId, "testpmd> ") + self.dut.send_expect('port start all', "testpmd> ") + self.dut.send_expect('start', "testpmd> ") + else: self.dut.send_expect('rx_vlan add %s %s' % (invlan, dutRxPortId), "testpmd> ") self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ") self.vlan_send_packet(outvlan, invlan) self.check_result(vlanCase[caseIndex], configMode + " result Error") if (caseDef & txCase) != 0: + self.dut.send_expect('stop', "testpmd> ") + self.dut.send_expect('port stop all', "testpmd> ") self.dut.send_expect('tx_vlan reset %s' % dutTxPortId, "testpmd> ") + self.dut.send_expect('port start all', "testpmd> ") + self.dut.send_expect('start', "testpmd> ") self.dut.send_expect('rx_vlan rm %s %s' % (invlan, dutRxPortId), "testpmd> ") self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ") @@ -346,7 +359,11 @@ class TestDualVlan(TestCase): if(self.nic == "hartwell"): self.dut.send_expect("vlan set strip on %s" % dutTxPortId, "testpmd> ") + self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect("tx_vlan set %s %s" % (dutTxPortId, txvlan), "testpmd> ") + self.dut.send_expect("port start all", "testpmd> ") + self.dut.send_expect("start", "testpmd> ") self.vlan_send_packet() out = self.get_tcpdump_package() diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index be5512b..c0b26a3 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -290,7 +290,10 @@ class TestVfVlan(TestCase): # please enable rx_vlan at the same time if self.kdriver == "i40e": self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % tx_vlan) + self.vm0_testpmd.execute_cmd('stop') + self.vm0_testpmd.execute_cmd('port stop all') self.vm0_testpmd.execute_cmd('tx_vlan set 0 %d' % tx_vlan) + self.vm0_testpmd.execute_cmd('port start all') self.tx_and_check(tx_vlan=tx_vlan) self.vm0_testpmd.quit() diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index dc68a6e..dad5f7b 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -205,7 +205,10 @@ class TestVlan(TestCase): intf = self.tester.get_interface(port) self.dut.send_expect("set nbport 2", "testpmd> ") + self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect("tx_vlan set %s %d" % (dutTxPortId, self.vlan), "testpmd> ") + self.dut.send_expect("port start all", "testpmd> ") self.dut.send_expect("start", "testpmd> ") self.vlan_send_packet(-1) -- 1.8.3.1