From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8FB1EA00E6 for ; Fri, 14 Jun 2019 13:12:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C43D1D528; Fri, 14 Jun 2019 13:12:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B53571D527 for ; Fri, 14 Jun 2019 13:12:43 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB9gCV014334 for ; Fri, 14 Jun 2019 04:12:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=dp9NmSmIDV1dbgUulPX0z/btcWcUhFjyCFCG9mRASIg=; b=SGOnTQIfdlXfDE2qqBeQjUTT4hiQwyLzZwPacRUW9cl7nrItfsPRjt+f+z6ULix0sZuj d3YF6AdEzypakk/m0HHoGPe0WpDwqQDZ6YWQkbseogN1SzOwpZx2KmTqeXCJYQ0m0s0o hobd9c3dWV1CHBukXVU3vGvk0P/iIn8Z/q21V5rIGUHM1g3KxF03XFfss2jrxX++CtMa dTB0Anv15xy/kaStsKvlGePpl5taqCXEg60CVmf9DBaX74WmGSdPwPOv/FEr1aSngqa1 sA+B65uzxq2O44jadlb3KttxQrMBr7ITJ1NJJiM67oE8qpr0RppYSTZcWUlNIoKm2guT rQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2t41j62090-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 04:12:42 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 14 Jun 2019 04:12:41 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 14 Jun 2019 04:12:41 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id 6A99F3F703F; Fri, 14 Jun 2019 04:12:39 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Fri, 14 Jun 2019 16:42:36 +0530 Message-ID: <1560510756-509-1-git-send-email-pvukkisala@marvell.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 Subject: [dts] [PATCH] checksum_offload: Support this test in vector mode 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Phanendra Vukkisala Send and sniff 4 packets to support vector mode cavium HW stops calculating check sums upon receiving first incorrect checksum. So accept unknown also as bad Signed-off-by: Phanendra Vukkisala --- tests/TestSuite_checksum_offload.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 6541ba5..d4021b9 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -118,7 +118,7 @@ class TestChecksumOffload(TestCase): self.tester.scapy_foreground() for packet_type in packets_sent.keys(): - self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface)) + self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface)) self.tester.scapy_execute() out = self.dut.get_session_output(timeout=1) lines = out.split("\r\n") @@ -146,7 +146,10 @@ class TestChecksumOffload(TestCase): self.verify("PKT_RX_L4_CKSUM_GOOD" in line, "Packet Rx L4 checksum valid-flags error!") self.verify("PKT_RX_IP_CKSUM_GOOD" in line, "Packet Rx IP checksum valid-flags error!") elif (flag == 0): - self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!") + if self.nic == "cavium_a063": + self.verify("PKT_RX_L4_CKSUM_BAD" in line or "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags error!") + else: + self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!") self.verify("PKT_RX_IP_CKSUM_BAD" in line, "Packet Rx IP checksum valid-flags error!") self.dut.send_expect("stop", "testpmd>") @@ -174,11 +177,11 @@ class TestChecksumOffload(TestCase): self.tester.send_expect("exit()", "#") - inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent), + inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent)*4, filters=[{'layer':'ether', 'config':{'src': sniff_src}}]) for packet_type in packets_sent.keys(): - self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface)) + self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface)) self.tester.scapy_execute() p = self.tester.load_tcpdump_sniff_packets(inst) @@ -186,7 +189,7 @@ class TestChecksumOffload(TestCase): reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)] out = string.join(reslist, ",") packets_received = out.split(',') - self.verify(len(packets_sent) == len(packets_received), "Unexpected Packets Drop") + self.verify(len(packets_sent)*4 == len(packets_received), "Unexpected Packets Drop") for packet_received in packets_received: ip_checksum, tcp_checksum, udp_checksum, sctp_checksum = packet_received.split(';') -- 1.7.9.5