From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 89F811BA2F for ; Tue, 10 Apr 2018 04:43:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2018 19:43:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,430,1517904000"; d="scan'208";a="190180049" Received: from unknown (HELO dpdk-test60.sh.intel.com) ([10.67.110.26]) by orsmga004.jf.intel.com with ESMTP; 09 Apr 2018 19:43:55 -0700 From: Xueqin Lin To: dts@dpdk.org Cc: Xueqin Lin Date: Mon, 9 Apr 2018 16:41:39 -0400 Message-Id: <1523306499-188943-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dts] [dt][PATCH] ddp_gtp: delete profile instead of core reset before quit testpmd 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, 10 Apr 2018 02:44:00 -0000 Remove profile instead of core reset workaround to restore original configuration to avoid exception. --- test_plans/ddp_gtp_test_plan.rst | 20 +++++++++++--------- tests/TestSuite_ddp_gtp.py | 20 ++++++++++++++------ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/test_plans/ddp_gtp_test_plan.rst b/test_plans/ddp_gtp_test_plan.rst index aedf45f..b471d2b 100644 --- a/test_plans/ddp_gtp_test_plan.rst +++ b/test_plans/ddp_gtp_test_plan.rst @@ -92,9 +92,10 @@ Test Case: Load dynamic device personalization testpmd > port stop all -2. Load profile gtp.pkgo which is a binary file:: +2. Load gtp.pkgo file to the memory buffer, save original configuration + and return in the same buffer to the gtp.bak file:: - testpmd > ddp add (port_id) (profile_path) + testpmd > ddp add (port_id) /tmp/gtp.pkgo,/tmp/gtp.bak 3. Check profile information successfully:: @@ -104,6 +105,13 @@ Test Case: Load dynamic device personalization testpmd > port start all +Test Case: Delete dynamic device personalization +================================================ + +Remove profile from the network adapter and restore original configuration:: + + testpmd > ddp del (port_id) /tmp/gtp.bak + Note: 1. Gtp.pkgo profile is not released by ND yet, only have engineer version for @@ -112,13 +120,7 @@ Note: 2. Loading DDP is the prerequisite for below GTP relative cases. Load profile again once restarting testpmd to let software detect this - event, although has “profile has already existed” reminder. Operate - global reset or lanconf tool to recover original setting. Global reset - trigger reg is 0xb8190, first cmd is core reset, second cmd is global - reset:: - - testpmd > write reg 0 0xb8190 1 - testpmd > write reg 0 0xb8190 2 + event, although has “profile has already existed” reminder. Test Case: GTP-C FDIR packet for PF diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py index d869580..6b6f975 100644 --- a/tests/TestSuite_ddp_gtp.py +++ b/tests/TestSuite_ddp_gtp.py @@ -141,7 +141,7 @@ class TestDdpGtp(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!!!") @@ -385,11 +385,19 @@ class TestDdpGtp(TestCase): type='clfter', port='vf id 0', tunnel_pkt='gtpu', inner_L3='ipv6') 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_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/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.vm0_testpmd.quit() + self.dut_testpmd.quit() def tear_down_all(self): self.destroy_vm_env() -- 2.5.5