From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 39644397D for ; Thu, 25 Jan 2018 03:51:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 18:51:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="29288633" Received: from juan.sh.intel.com ([10.67.119.88]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2018 18:51:40 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Thu, 25 Jan 2018 19:27:04 +0800 Message-Id: <1516879624-29246-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2]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: Thu, 25 Jan 2018 02:51:42 -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 | 22 ++++++++++++++++++++++ tests/TestSuite_vf_vlan.py | 3 +++ tests/TestSuite_vlan.py | 3 +++ 3 files changed, 28 insertions(+) diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py index d2eb79b..db9d5f5 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,13 +359,22 @@ 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() self.verify("vlan %s" % txvlan in out, "vlan inset enalber error: " + out) + 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.vlan_send_packet() out = self.get_tcpdump_package() self.verify("vlan %s" % txvlan not in out, "vlan inset disable error: " + out) 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