From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7FE091B508 for ; Tue, 8 Jan 2019 13:16:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2019 04:16:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,454,1539673200"; d="scan'208";a="116414702" Received: from dpdk-test60.sh.intel.com ([10.67.111.110]) by orsmga003.jf.intel.com with ESMTP; 08 Jan 2019 04:16:51 -0800 From: Xueqin Lin To: dts@dpdk.org Cc: "xueqin.lin" Date: Tue, 8 Jan 2019 01:16:05 -0500 Message-Id: <1546928165-173890-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dts] [PATCH] tests/ddp_mpls: fix nic support and core reset 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 12:16:54 -0000 From: "xueqin.lin" 1. DDP MPLs could support FVL nic, not only fortville_25g. 2. Restore original profile instead of core reset to avoid exception. Signed-off-by: Xueqin Lin --- tests/TestSuite_ddp_mpls.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index 691e958..b002788 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -18,8 +18,8 @@ VF_MAX_QUEUE = 4 class Testddp_mpls(TestCase): def set_up_all(self): - self.verify(self.nic in ['fortville_25g'], - 'ddp mpls can not support %s nic' % self.nic) + self.verify('fortville' in self.nic, + 'ddp mpls can not support %s nic' % self.nic) self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports") self.vm0 = None @@ -123,7 +123,7 @@ class Testddp_mpls(TestCase): out = self.dut_testpmd.execute_cmd('ddp get list 0') self.verify("Profile number is: 0" in out, "Failed to get ddp profile info list!!!") - self.dut_testpmd.execute_cmd('ddp add 0 /tmp/mpls.pkgo') + self.dut_testpmd.execute_cmd('ddp add 0 /tmp/mpls.pkgo,/tmp/mpls.bak') out = self.dut_testpmd.execute_cmd('ddp get list 0') self.verify("Profile number is: 1" in out, "Failed to load ddp profile!!!") @@ -224,13 +224,19 @@ class Testddp_mpls(TestCase): def tear_down(self): - if self.vm0_testpmd: - self.dut_testpmd.execute_cmd('write reg 0 0xb8190 1') - self.dut_testpmd.execute_cmd('write reg 0 0xb8190 2') - self.vm0_testpmd.quit() - self.dut_testpmd.quit() - self.vm0_dut.kill_all() - pass + self.vm0_testpmd.execute_cmd('stop') + 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/mpls.bak') + out = self.dut_testpmd.execute_cmd('ddp get list 0') + self.verify("Profile number is: 0" in out, + "Failed to delete mpls profile!!!") + self.dut_testpmd.execute_cmd('port start all') + self.vm0_testpmd.quit() + self.dut_testpmd.quit() def tear_down_all(self): -- 2.7.5