test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuanx.a.tu@intel.com>
To: dts@dpdk.org
Cc: Lijuan Tu <lijuanx.a.tu@intel.com>
Subject: [dts] [PATCH v1]vf tests: enable crc-strip when start testpmd.
Date: Fri,  1 Jul 2016 12:39:12 +0800	[thread overview]
Message-ID: <1467347952-31665-1-git-send-email-lijuanx.a.tu@intel.com> (raw)

releated tests:
    vf_jumboframe, vf_macfilter, vf_packet_rxtx
    vf_port_start_stop, vf_rss, vf_to_vf_nic_bridge

fortville  VF can't disable HW crc-strip
testpmd disable crc-strip by default
dpdk 16.07 will quit when disable crc-strip failed.

Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
 tests/TestSuite_vf_jumboframe.py       | 40 +++++++++++++---------------------
 tests/TestSuite_vf_macfilter.py        | 16 +++++++-------
 tests/TestSuite_vf_packet_rxtx.py      | 15 ++++++++++---
 tests/TestSuite_vf_port_start_stop.py  |  5 ++++-
 tests/TestSuite_vf_rss.py              | 12 ++++++++--
 tests/TestSuite_vf_to_vf_nic_bridge.py | 10 +++++++--
 6 files changed, 57 insertions(+), 41 deletions(-)

diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index 71aa650..bac4a29 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -190,12 +190,10 @@ class TestVfJumboFrame(TestCase):
             self.dutobj.enable_jumbo(framesize=ETHER_STANDARD_MTU)
             time.sleep(2)
 
-        self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --txqflags=0x0" % (ETHER_STANDARD_MTU))
         if self.kdriver == "i40e":
-            # forville vf crc setting alias with host
-            self.vm_testpmd.execute_cmd("port stop all")
-            self.vm_testpmd.execute_cmd("port config all crc-strip on")
-            self.vm_testpmd.execute_cmd("port start all")
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --crc-strip --txqflags=0x0" % (ETHER_STANDARD_MTU))
+        else:
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --txqflags=0x0" % (ETHER_STANDARD_MTU))
 
         self.vm_testpmd.execute_cmd("set fwd mac")
         self.vm_testpmd.execute_cmd("start")
@@ -217,12 +215,10 @@ class TestVfJumboFrame(TestCase):
             self.dutobj.enable_jumbo(framesize=ETHER_JUMBO_FRAME_MTU)
             time.sleep(2)
 
-        self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
         if self.kdriver == "i40e":
-            # forville vf crc setting alias with host
-            self.vm_testpmd.execute_cmd("port stop all")
-            self.vm_testpmd.execute_cmd("port config all crc-strip on")
-            self.vm_testpmd.execute_cmd("port start all")
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --crc-strip --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
+        else:
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
 
         self.vm_testpmd.execute_cmd("set fwd mac")
         self.vm_testpmd.execute_cmd("start")
@@ -244,12 +240,10 @@ class TestVfJumboFrame(TestCase):
             self.dutobj.enable_jumbo(framesize=ETHER_STANDARD_MTU)
             time.sleep(2)
 
-        self.vm_testpmd.start_testpmd("Default", "--port-topology=loop --txqflags=0x0")
         if self.kdriver == "i40e":
-            # forville vf crc setting alias with host
-            self.vm_testpmd.execute_cmd("port stop all")
-            self.vm_testpmd.execute_cmd("port config all crc-strip on")
-            self.vm_testpmd.execute_cmd("port start all")
+            self.vm_testpmd.start_testpmd("Default", "--port-topology=loop --crc-strip --txqflags=0x0" )
+        else:
+            self.vm_testpmd.start_testpmd("Default", "--port-topology=loop --txqflags=0x0")
 
         self.vm_testpmd.execute_cmd("set fwd mac")
         self.vm_testpmd.execute_cmd("start")
@@ -270,12 +264,10 @@ class TestVfJumboFrame(TestCase):
             self.dutobj.enable_jumbo(framesize=ETHER_JUMBO_FRAME_MTU)
             time.sleep(2)
 
-        self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
         if self.kdriver == "i40e":
-            # forville vf crc setting alias with host
-            self.vm_testpmd.execute_cmd("port stop all")
-            self.vm_testpmd.execute_cmd("port config all crc-strip on")
-            self.vm_testpmd.execute_cmd("port start all")
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --crc-strip --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
+        else:
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
 
         self.vm_testpmd.execute_cmd("set fwd mac")
         self.vm_testpmd.execute_cmd("start")
@@ -298,12 +290,10 @@ class TestVfJumboFrame(TestCase):
             self.dutobj.enable_jumbo(framesize=ETHER_JUMBO_FRAME_MTU)
             time.sleep(2)
 
-        self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
         if self.kdriver == "i40e":
-            # forville vf crc setting alias with host
-            self.vm_testpmd.execute_cmd("port stop all")
-            self.vm_testpmd.execute_cmd("port config all crc-strip on")
-            self.vm_testpmd.execute_cmd("port start all")
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --crc-strip --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
+        else:
+            self.vm_testpmd.start_testpmd("Default", "--max-pkt-len=%s --port-topology=loop --txqflags=0x0" % (ETHER_JUMBO_FRAME_MTU))
 
         self.vm_testpmd.execute_cmd("set fwd mac")
         self.vm_testpmd.execute_cmd("start")
diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py
index 1f7fbfb..061f7ab 100644
--- a/tests/TestSuite_vf_macfilter.py
+++ b/tests/TestSuite_vf_macfilter.py
@@ -115,13 +115,13 @@ class TestVfMacFilter(TestCase):
 
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         # Get VF's MAC
         pmd_vf0_mac = self.vm0_testpmd.get_port_mac(0)
         vf0_wrongmac = "00:11:22:33:48:55"
-        self.vm0_testpmd.execute_cmd('port stop all')
-        self.vm0_testpmd.execute_cmd('port config all crc-strip on')
-        self.vm0_testpmd.execute_cmd('port start all')
         self.vm0_testpmd.execute_cmd('set promisc all off')
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
@@ -162,15 +162,15 @@ class TestVfMacFilter(TestCase):
 
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         
         # Get VF0 port MAC address
         pmd_vf0_mac = self.vm0_testpmd.get_port_mac(0)
         vf0_setmac = "00:11:22:33:44:55"
         vf0_wrongmac = "00:11:22:33:48:55"
-        self.vm0_testpmd.execute_cmd('port stop all')
-        self.vm0_testpmd.execute_cmd('port config all crc-strip on')
-        self.vm0_testpmd.execute_cmd('port start all')
         self.vm0_testpmd.execute_cmd('set promisc all off')
         ret = self.vm0_testpmd.execute_cmd('mac_addr add 0 %s' %vf0_setmac)
         # check the operation is supported or not.
diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index 599bc8d..2f9dfc1 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -111,7 +111,10 @@ class TestVfPacketRxtx(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
         port_id_0 = 0
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('port stop all')
         self.vm0_testpmd.execute_cmd('port config all crc-strip on')
         self.vm0_testpmd.execute_cmd('port start all')
@@ -241,7 +244,10 @@ class TestVfPacketRxtx(TestCase):
         port_id_1 = 1
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('show port info all')
         pmd0_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
         self.vm0_testpmd.execute_cmd('set fwd mac')
@@ -250,7 +256,10 @@ class TestVfPacketRxtx(TestCase):
         time.sleep(2)
 
         self.vm1_testpmd = PmdOutput(self.vm_dut_1)
-        self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm1_testpmd.execute_cmd('show port info all')
 
         tx_port = self.tester.get_local_port(self.dut_ports[0])
diff --git a/tests/TestSuite_vf_port_start_stop.py b/tests/TestSuite_vf_port_start_stop.py
index 0cc7ffd..b98d786 100644
--- a/tests/TestSuite_vf_port_start_stop.py
+++ b/tests/TestSuite_vf_port_start_stop.py
@@ -214,7 +214,10 @@ class TestVfPortStartStop(TestCase):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
-        self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        if self.kdriver == "i40e":
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
+        else:
+            self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
         self.vm0_testpmd.execute_cmd('set fwd mac')
 
         time.sleep(2)
diff --git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py
index 0e83832..cb2ffc9 100644
--- a/tests/TestSuite_vf_rss.py
+++ b/tests/TestSuite_vf_rss.py
@@ -302,10 +302,14 @@ class TestVfRss(TestCase):
         self.vm_dut_0.kill_all()
 
         # test with different rss queues
+        if self.kdriver == "i40e":
+            eal_param = '--crc-strip'
+        else:
+            eal_param = ''
         for queue in testQueues:
 
             self.vm0_testpmd.start_testpmd(
-                "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
+                "all", "--rxq=%d --txq=%d %s" % (queue, queue, eal_param), socket=self.ports_socket)
 
             for iptype in iptypes:
                 self.vm_dut_0.send_expect("set verbose 8", "testpmd> ")
@@ -346,11 +350,15 @@ class TestVfRss(TestCase):
 
         self.vm_dut_0.kill_all()
 
+        if self.kdriver == "i40e":
+            eal_param = '--crc-strip'
+        else:
+            eal_param = ''
         # test with different rss queues
         for queue in testQueues:
 
             self.vm0_testpmd.start_testpmd(
-                "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
+                "all", "--rxq=%d --txq=%d %s" % (queue, queue, eal_param), socket=self.ports_socket)
 
             for iptype,rsstype in iptypes.items():
                 self.vm_dut_0.send_expect("set verbose 8", "testpmd> ")
diff --git a/tests/TestSuite_vf_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py
index 2da9645..4137404 100644
--- a/tests/TestSuite_vf_to_vf_nic_bridge.py
+++ b/tests/TestSuite_vf_to_vf_nic_bridge.py
@@ -155,7 +155,10 @@ class TestVF2VFBridge(TestCase):
     def test_2vf_d2d_pktgen_stream(self):
         self.vm0_ports = self.vm0_dut.get_ports('any')
         self.vm0_pmd = PmdOutput(self.vm0_dut)
-        self.vm0_pmd.start_testpmd('all')
+        if self.kdriver == "i40e":
+            self.vm0_pmd.start_testpmd('all', '--crc-strip')
+        else:
+            self.vm0_pmd.start_testpmd('all')
         self.vm0_pmd.execute_cmd('set fwd rxonly')
         self.vm0_pmd.execute_cmd('start')
 
@@ -214,7 +217,10 @@ class TestVF2VFBridge(TestCase):
     def test_2vf_k2d_scapy_stream(self):
         self.vm0_ports = self.vm0_dut.get_ports('any')
         self.vm0_pmd = PmdOutput(self.vm0_dut)
-        self.vm0_pmd.start_testpmd('all')
+        if self.kdriver == "i40e":
+            self.vm0_pmd.start_testpmd('all', '--crc-strip')
+        else:
+            self.vm0_pmd.start_testpmd('all')
         self.vm0_pmd.execute_cmd('set fwd rxonly')
         self.vm0_pmd.execute_cmd('start')
         self.vm0_pmd.execute_cmd('clear port stats all')
-- 
1.9.3

             reply	other threads:[~2016-07-01  4:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  4:39 Lijuan Tu [this message]
2016-07-07  5:37 ` Liu, Yong

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=1467347952-31665-1-git-send-email-lijuanx.a.tu@intel.com \
    --to=lijuanx.a.tu@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).