test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] fix tx crc issue
@ 2015-11-25  7:53 haifeng
  0 siblings, 0 replies; only message in thread
From: haifeng @ 2015-11-25  7:53 UTC (permalink / raw)
  To: dts

---
 tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 23888f4..411e4bf 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
         stats = output.get_pmd_stats(portid)
         return stats
 
-    def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
+    def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=True):
         if ports is None:
             ports = self.ports
         if len(ports) == 1:
@@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
                 # RRC will always strip rx/tx vlan
                 rx_bytes_exp -= 4
                 tx_bytes_exp -= 4
-        elif self.nic in ["fortville_eagle", "fortville_spirit",
-                        "fortville_spirit_single", "bartonhills"]:
-            # some NIC will always strip tx crc
-            tx_bytes_exp -= 4
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
-        elif self.nic in ["springville", "powerville"]:
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
         else:
-            # some NIC will always include tx crc
-            if crcStrip is True:
-                rx_bytes_exp -= 4
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
-
+             if self.nic not in ['kawela_4']:
+                 tx_bytes_exp -= 4
+                 if crcStrip is True:
+                     rx_bytes_exp -= 4
+             if vlan is True:
+                tx_bytes_exp -= 4   
+        
         if received:
             self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d, p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
             self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
-- 
1.9.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-25  7:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25  7:53 [dts] [PATCH] fix tx crc issue haifeng

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).