From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C35F7A0613 for ; Tue, 27 Aug 2019 08:48:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F6631BEDD; Tue, 27 Aug 2019 08:48:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 695DB1BEC5 for ; Tue, 27 Aug 2019 08:48:37 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7R6jVQT018357 for ; Mon, 26 Aug 2019 23:48:36 -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=Zq2G/DQq0GpdDkOU750s8l3f/kMRdEo2FwTUeGS+Jjo=; b=ePrzIDyILhzaOJpamz3g4cEPmDD9ogsKVRjeRK48Z89AR+D6C6bBQ2w8FDblrH6J2+79 TQ/oAEipNji/nF6wKCgSnhipEMyirTzDVGLZuWsS3J0yLyurBX9dwjMJpciSO1bgy45l fVVbLEKcsDmwbXlfbbIGpw2igSI08lFpOQX4FKK9ioYXHRgJQXLeKPhCmECxzjTuTZhl 4erekTU/7q3QJHBhuGAXlAkqAO6uUNrV3zi20JrxH2kyRE2mhFojfU8toglpG6FrPYw9 AlDecsuUFcU8lkMWt5/QT0dVfvLYeNZMUE7KvqcPlZyT0Ogobv4CJbP7J0dCWALZE9JT rQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2uk2kq2bww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 26 Aug 2019 23:48:36 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 26 Aug 2019 23:48:34 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 26 Aug 2019 23:48:34 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id 5169D3F7040; Mon, 26 Aug 2019 23:48:33 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Tue, 27 Aug 2019 12:18:28 +0530 Message-ID: <1566888508-5477-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:5.22.84,1.0.8 definitions=2019-08-26_08:2019-08-26,2019-08-26 signatures=0 Subject: [dts] [PATCH] pmd: Add test case packet checking in scalar mode for marvell device 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 Updated testplan, test script and support list. Signed-off-by: Phanendra Vukkisala --- conf/test_case_supportlist.json | 16 +++++++++++++++ test_plans/pmd_test_plan.rst | 15 ++++++++++++++ tests/TestSuite_pmd.py | 41 ++++++++++++++++++++++++++++++++------- 3 files changed, 65 insertions(+), 7 deletions(-) diff --git a/conf/test_case_supportlist.json b/conf/test_case_supportlist.json index f547b32..9c39f33 100644 --- a/conf/test_case_supportlist.json +++ b/conf/test_case_supportlist.json @@ -1612,5 +1612,21 @@ "Bug ID": "", "Comments": "This case currently support for niantic " } + ], + "packet_checking_scalar_mode": [ + { + "OS": [ + "ALL" + ], + "NIC": [ + "cavium_a064", + "cavium_a063" + ], + "Target": [ + "ALL" + ], + "Bug ID": "", + "Comments": "This case currently support for cavium_a063 and cavium_a064 " + } ] } diff --git a/test_plans/pmd_test_plan.rst b/test_plans/pmd_test_plan.rst index a077cfa..f84fa55 100644 --- a/test_plans/pmd_test_plan.rst +++ b/test_plans/pmd_test_plan.rst @@ -92,6 +92,21 @@ Test Case: Packet Checking which will be forwarded by the DUT. The test checks if the packets are correctly forwarded and if both RX and TX packet sizes match by `show port all stats` +Test Case: Packet Checking in scalar mode +========================================= + +The linuxapp is started with the following parameters: + +:: + -c 0x6 -n 4 -w ,scalar_enable=1 -- -i --portmask= + + +This test is applicable for Marvell devices. The tester sends 1 packet at a +time with different sizes (64, 65, 128, 256, 512, 1024, 1280 and 1518 bytes), +using scapy, which will be forwarded by the DUT. The test checks if the packets +are correctly forwarded and if both RX and TX packet sizes match. + + Test Case: Descriptors Checking =============================== diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index dc9078f..46141d6 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -386,6 +386,29 @@ class TestPmd(TestCase): self.dut.send_expect("quit", "# ", 30) sleep(5) + def test_packet_checking_scalar_mode(self): + """ + Packet forwarding checking test + """ + + self.dut.kill_all() + + port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]]) + + eal_opts = "" + for port in self.dut_ports: + eal_opts += "-w %s,scalar_enable=1 "%(self.dut.get_port_pci(self.dut_ports[port])) + + + self.pmdout.start_testpmd("1S/2C/1T", "--portmask=%s" % port_mask, eal_param = eal_opts, socket=self.ports_socket) + self.dut.send_expect("start", "testpmd> ") + for size in self.frame_sizes: + self.send_packet(size, scalar_test=True) + + self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("quit", "# ", 30) + sleep(5) + def stop_and_get_l4csum_errors(self): """ Stop forwarding and get Bad-l4csum number from stop statistic @@ -406,7 +429,7 @@ class TestPmd(TestCase): stats = self.pmdout.get_pmd_stats(portid) return stats - def send_packet(self, frame_size, checksum_test=False): + def send_packet(self, frame_size, checksum_test=False, scalar_test=False): """ Send 1 packet to portid """ @@ -428,10 +451,14 @@ class TestPmd(TestCase): if checksum_test: checksum = 'chksum=0x1' + if scalar_test: + pkt_count = 1 + else: + pkt_count = 4 self.tester.scapy_foreground() self.tester.scapy_append('nutmac="%s"' % mac) - self.tester.scapy_append('sendp([Ether(dst=nutmac, src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)], iface="%s", count=4)' % ( - load_size, checksum, padding, interface)) + self.tester.scapy_append('sendp([Ether(dst=nutmac, src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)], iface="%s", count=%s)' % ( + load_size, checksum, padding, interface, pkt_count)) out = self.tester.scapy_execute() time.sleep(.5) @@ -452,11 +479,11 @@ class TestPmd(TestCase): self.verify(self.pmdout.check_tx_bytes(p0tx_pkts, p1rx_pkts), "packet pass assert error, %d RX packets, %d TX packets" % (p1rx_pkts, p0tx_pkts)) - self.verify(p1rx_bytes == (frame_size - 4)*4, - "packet pass assert error, expected %d RX bytes, actual %d" % ((frame_size - 4)*4, p1rx_bytes)) + self.verify(p1rx_bytes == (frame_size - 4)*pkt_count, + "packet pass assert error, expected %d RX bytes, actual %d" % ((frame_size - 4)*pkt_count, p1rx_bytes)) - self.verify(self.pmdout.check_tx_bytes(p0tx_bytes, (frame_size - 4)*4), - "packet pass assert error, expected %d TX bytes, actual %d" % ((frame_size - 4)*4, p0tx_bytes)) + self.verify(self.pmdout.check_tx_bytes(p0tx_bytes, (frame_size - 4)*pkt_count), + "packet pass assert error, expected %d TX bytes, actual %d" % ((frame_size - 4)*pkt_count, p0tx_bytes)) return out -- 1.7.9.5