From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7E2A82A61 for ; Thu, 17 Sep 2015 11:11:32 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 17 Sep 2015 02:11:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,545,1437462000"; d="scan'208";a="770947241" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga001.jf.intel.com with ESMTP; 17 Sep 2015 02:11:29 -0700 From: changru To: dts@dpdk.org Date: Thu, 17 Sep 2015 17:07:13 +0800 Message-Id: <1442480833-42991-1-git-send-email-changrux.fan@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH] Fix checksum_checking failed issue 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: Thu, 17 Sep 2015 09:11:33 -0000 In UDP packet, if the chksum is equal to 0, it means the receiver don't need to check. But, we want to send a packet with an error checksum. On the other hand, on 1G NICs, the packet received has the same length with the packet sent. Signed-off-by: changru --- tests/TestSuite_pmd.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index afb2450..525ed02 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -375,7 +375,7 @@ class TestPmd(TestCase,IxiaPacketGenerator): checksum = '' if checksum_test: - checksum = 'chksum=0x0' + checksum = 'chksum=0x1' self.tester.scapy_foreground() self.tester.scapy_append('nutmac="%s"' % mac) @@ -402,8 +402,12 @@ class TestPmd(TestCase,IxiaPacketGenerator): "packet pass assert error, %d RX packets, %d TX packets" % (p1rx_pkts, p0tx_pkts)) if checksum_test: - self.verify(p1rx_bytes == frame_size - 4, - "packet pass assert error, expected %d RX bytes, actual %d" % (frame_size - 4, p1rx_bytes)) + if self.nic in ["powerville", "springville", "kawela_4"]: + self.verify(p1rx_bytes == frame_size, + "packet pass assert error, expected %d RX bytes, actual %d" % (frame_size, p1rx_bytes)) + else: + self.verify(p1rx_bytes == frame_size - 4, + "packet pass assert error, expected %d RX bytes, actual %d" % (frame_size - 4, p1rx_bytes)) else: self.verify(p1rx_bytes == frame_size, "packet pass assert error, expected %d RX bytes, actual %d" % (frame_size, p1rx_bytes)) -- 2.1.0