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 3/8] tests/vf_offload: fix variable name typo and remove crc-strip parameter
Date: Fri, 12 May 2017 16:18:10 +0800	[thread overview]
Message-ID: <1494577095-45103-4-git-send-email-lijuanx.a.tu@intel.com> (raw)
In-Reply-To: <1494577095-45103-1-git-send-email-lijuanx.a.tu@intel.com>

Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
 tests/TestSuite_vf_offload.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index 6a4ab52..ed6d106 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -2,6 +2,7 @@
 
 import re
 import time
+import string
 
 import utils
 from qemu_kvm import QEMUKvm
@@ -10,7 +11,6 @@ from pmd_output import PmdOutput
 from utils import RED, GREEN
 from net_device import NetDevice
 from crb import Crb
-from scapy.all import *
 from settings import HEADER_SIZE
 VM_CORES_MASK = 'all'
 
@@ -77,19 +77,20 @@ class TestVfOffload(TestCase):
             self.vm0_dut_ports = None
             #destroy vm0
             self.vm0.stop()
+            self.dut.virt_exit()
             self.vm0 = None
 
         if getattr(self, 'host_testpmd', None):
             self.host_testpmd.execute_cmd('quit', '# ')
             self.host_testpmd = None
 
-        if getattr(self, 'used_dut_port_0', None):
+        if getattr(self, 'used_dut_port_0', None) != None:
             self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0)
             port = self.dut.ports_info[self.used_dut_port_0]['port']
             port.bind_driver()
             self.used_dut_port_0 = None
 
-        if getattr(self, 'used_dut_port_1', None):
+        if getattr(self, 'used_dut_port_1', None) != None:
             self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
             port = self.dut.ports_info[self.used_dut_port_1]['port']
             port.bind_driver()
@@ -191,7 +192,7 @@ class TestVfOffload(TestCase):
         """
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK, "--portmask=%s " %
                                       (self.portMask) + "--disable-hw-vlan --enable-rx-cksum " + "--txqflags=0 " +
-                                      "--crc-strip --port-topology=loop")
+                                      "--port-topology=loop")
         self.vm0_testpmd.execute_cmd('set fwd csum')
 
         time.sleep(2)
@@ -206,8 +207,8 @@ class TestVfOffload(TestCase):
                 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (mac, sndIPv6),
                 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (mac, sndIPv6)}
 
-        expIP = "10.0.0.2"
-        expIPv6 = '::2'
+        expIP = sndIP
+        expIPv6 = sndIPv6
         pkts_ref = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/UDP()/("X"*46)' % (mac, expIP),
                     'IP/TCP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/TCP()/("X"*46)' % (mac, expIP),
                     'IP/SCTP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/SCTP()/("X"*48)' % (mac, expIP),
@@ -241,7 +242,7 @@ class TestVfOffload(TestCase):
 
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK, "--portmask=%s " %
                                       (self.portMask) + "--disable-hw-vlan --enable-rx-cksum " +
-                                      "--crc-strip --port-topology=loop")
+                                      "--port-topology=loop")
         self.vm0_testpmd.execute_cmd('set fwd csum')
 
         time.sleep(2)
@@ -254,8 +255,8 @@ class TestVfOffload(TestCase):
                    'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP(chksum=0xf)/("X"*46)' % (mac, sndIPv6),
                    'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP(chksum=0xf)/("X"*46)' % (mac, sndIPv6)}
 
-        expIP = "10.0.0.2"
-        expIPv6 = '::2'
+        expIP = sndIP
+        expIPv6 = sndIPv6
         expPkts = {'IP/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/UDP()/("X"*46)' % (mac, expIP),
                    'IP/TCP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/TCP()/("X"*46)' % (mac, expIP),
                    'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (mac, expIPv6),
@@ -333,7 +334,7 @@ class TestVfOffload(TestCase):
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK, "--portmask=%s " %
                                       (self.portMask) + "--enable-rx-cksum " +
                                       "--txqflags=0 " + 
-                                      "--crc-strip --port-topology=loop")
+                                      "--port-topology=loop")
 
         mac = self.vm0_testpmd.get_port_mac(0)
 
-- 
1.9.3

  parent reply	other threads:[~2017-05-12  8:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12  8:18 [dts] [PATCH V1 0/8] sync virtual tests to dpdk1705 Lijuan Tu
2017-05-12  8:18 ` [dts] [PATCH V1 1/8] tests/vf_packet_rxtx: remove crc-strip parameter Lijuan Tu
2017-05-15  1:56   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 2/8] tests/vf_macfilter: " Lijuan Tu
2017-05-15  1:57   ` Liu, Yong
2017-05-12  8:18 ` Lijuan Tu [this message]
2017-05-15  1:57   ` [dts] [PATCH V1 3/8] tests/vf_offload: fix variable name typo and " Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 4/8] tests/vf_port_start_stop: make adjustment to dpdk1705 Lijuan Tu
2017-05-15  2:00   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 5/8] test/vf_rss: remove crc-strip parameter, and check RSS config command Lijuan Tu
2017-05-15  2:01   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 6/8] test/vf_to_vf_nic_bridge: remove crc-strip parameter and filter misc packets Lijuan Tu
2017-05-15  2:03   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 7/8] tests/vm_power_manager: adjust to dpdk1705 Lijuan Tu
2017-05-15  2:05   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH 8/8] tests/vxlan_sample: " Lijuan Tu
2017-05-15  2:06   ` 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=1494577095-45103-4-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).