From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C4D712952 for ; Fri, 1 Jul 2016 06:43:46 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 30 Jun 2016 21:43:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,555,1459839600"; d="scan'208";a="998545142" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by fmsmga001.fm.intel.com with ESMTP; 30 Jun 2016 21:43:34 -0700 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Fri, 1 Jul 2016 12:39:12 +0800 Message-Id: <1467347952-31665-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH v1]vf tests: enable crc-strip when start 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: Fri, 01 Jul 2016 04:43:47 -0000 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 --- 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