[dts] [PATCH V1] fix csum set issue

xu,gang gangx.xu at intel.com
Fri Feb 9 09:37:12 CET 2018


When we run command "csum set ip/udp/tcp/sctp hw $port_id", need stop port first.
And we run command "csum set ip/udp/tcp/sctp sw $port_id", need too


Signed-off-by: xu,gang <gangx.xu at intel.com>
---
 tests/TestSuite_nvgre.py | 2 ++
 tests/TestSuite_vxlan.py | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
index d64c3cb..99b8490 100644
--- a/tests/TestSuite_nvgre.py
+++ b/tests/TestSuite_nvgre.py
@@ -551,12 +551,14 @@ class TestNvgre(TestCase):
         # enable tx checksum offload
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
         self.dut.send_expect("set fwd csum", "testpmd>", 10)
+        self.dut.send_expect("port stop all", "testpmd>")
         self.dut.send_expect("csum set ip hw %d" % (self.dut_tx_port), "testpmd>", 10)
         self.dut.send_expect("csum set udp hw %d" % (self.dut_tx_port), "testpmd>", 10)
         self.dut.send_expect("csum set tcp hw %d" % (self.dut_tx_port), "testpmd>", 10)
         self.dut.send_expect("csum set sctp hw %d" % (self.dut_tx_port), "testpmd>", 10)
         self.dut.send_expect("csum set outer-ip hw %d" % (self.dut_tx_port), "testpmd>", 10)
         self.dut.send_expect("csum parse_tunnel on %d" % (self.dut_tx_port), "testpmd>", 10)
+        self.dut.send_expect("port start all", "testpmd>")
 
         # log the nvgre format
         arg_str = ""
diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 2e971d1..17a34d4 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -1142,14 +1142,18 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
                              "testpmd>", 10)
 
     def csum_set_type(self, proto, port):
+        self.dut.send_expect("port stop all", "testpmd>")
         out = self.dut.send_expect("csum set %s hw %d" % (proto, port),
                                    "testpmd>", 10)
+        self.dut.send_expect("port start all", "testpmd>")
         self.verify("Bad arguments" not in out, "Failed to set vxlan csum")
         self.verify("error" not in out, "Failed to set vxlan csum")
 
     def csum_set_sw(self, proto, port):
+        self.dut.send_expect("port stop all", "testpmd>")
         out = self.dut.send_expect("csum set %s sw %d" % (proto, port),
                                    "testpmd>", 10)
+        self.dut.send_expect("port start all", "testpmd>")
         self.verify("Bad arguments" not in out, "Failed to set vxlan csum")
         self.verify("error" not in out, "Failed to set vxlan csum")
 
-- 
1.9.3



More information about the dts mailing list