From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EBB151B276 for ; Tue, 8 Jan 2019 11:29:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2019 02:29:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,453,1539673200"; d="scan'208";a="113040354" Received: from dpdk-test60.sh.intel.com ([10.67.111.110]) by fmsmga007.fm.intel.com with ESMTP; 08 Jan 2019 02:28:59 -0800 From: Xueqin Lin To: dts@dpdk.org Cc: "xueqin.lin" Date: Mon, 7 Jan 2019 23:28:13 -0500 Message-Id: <1546921693-168124-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dts] [PATCH] tests/dynamic_flowtype: fix dynamic flowtype issues 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: Tue, 08 Jan 2019 10:29:01 -0000 From: "xueqin.lin" 1. Dynamic flowtype could support FVL nic, not only fortville_25g. 2. RSS works also could receive packets from queue 0. 3. Restore original profile instead of core reset to avoid exception. Signed-off-by: Xueqin Lin --- tests/TestSuite_dynamic_flowtype.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_dynamic_flowtype.py b/tests/TestSuite_dynamic_flowtype.py index 05e6bcb..4652955 100644 --- a/tests/TestSuite_dynamic_flowtype.py +++ b/tests/TestSuite_dynamic_flowtype.py @@ -12,7 +12,7 @@ VM_CORES_MASK = 'all' class TestDynamicFlowtype(TestCase): def set_up_all(self): - self.verify(self.nic in ['fortville_25g'], + self.verify('fortville' in self.nic, 'dynamic flow type mapping can not support %s nic' % self.nic) ports = self.dut.get_ports() @@ -61,7 +61,7 @@ class TestDynamicFlowtype(TestCase): self.dut_testpmd.execute_cmd('port stop all') time.sleep(1) out = self.dut_testpmd.execute_cmd('ddp get list 0') - self.dut_testpmd.execute_cmd('ddp add 0 /tmp/gtp.pkgo') + self.dut_testpmd.execute_cmd('ddp add 0 /tmp/gtp.pkgo,/tmp/gtp.bak') out = self.dut_testpmd.execute_cmd('ddp get list 0') self.verify("Profile number is: 1" in out, "Failed to load ddp profile!!!") @@ -179,8 +179,6 @@ class TestDynamicFlowtype(TestCase): self.tester.scapy_execute() out = self.dut.get_session_output(timeout=2) if match_opt == 'matched': - self.verify("port 0/queue 0" not in out, - "Failed to receive packet in rss queue!!!") self.verify("PKT_RX_RSS_HASH" in out, "Failed to receive packet in rss queue!!!") elif match_opt == 'not matched': @@ -280,10 +278,17 @@ class TestDynamicFlowtype(TestCase): self.dynamic_flowtype_test(pctype=25, flowtype=25, reset=False) def tear_down(self): - if self.dut_testpmd: - self.dut_testpmd.execute_cmd('write reg 0 0xb8190 1') - self.dut_testpmd.execute_cmd('write reg 0 0xb8190 2') - self.dut_testpmd.quit() + self.dut_testpmd.execute_cmd('stop') + out = self.dut_testpmd.execute_cmd('ddp get list 0') + if "Profile number is: 0" not in out: + self.dut_testpmd.execute_cmd('port stop all') + time.sleep(1) + self.dut_testpmd.execute_cmd('ddp del 0 /tmp/gtp.bak') + out = self.dut_testpmd.execute_cmd('ddp get list 0') + self.verify("Profile number is: 0" in out, + "Failed to delete ddp profile!!!") + self.dut_testpmd.execute_cmd('port start all') + self.dut_testpmd.quit() def tear_down_all(self): self.dut.kill_all() -- 2.7.5