test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xueqin Lin <xueqin.lin@intel.com>
To: dts@dpdk.org
Cc: Xueqin Lin <xueqin.lin@intel.com>
Subject: [dts] [dt][PATCH] ddp_gtp: delete profile instead of core reset before quit testpmd
Date: Mon,  9 Apr 2018 16:41:39 -0400	[thread overview]
Message-ID: <1523306499-188943-1-git-send-email-xueqin.lin@intel.com> (raw)

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

                 reply	other threads:[~2018-04-10  2:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1523306499-188943-1-git-send-email-xueqin.lin@intel.com \
    --to=xueqin.lin@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).