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 CC4CBA2E1B for ; Wed, 4 Sep 2019 07:16:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B0131EC91; Wed, 4 Sep 2019 07:16:58 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 203DB1EC8D for ; Wed, 4 Sep 2019 07:16:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2019 22:16:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,465,1559545200"; d="scan'208";a="182368807" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga008.fm.intel.com with ESMTP; 03 Sep 2019 22:16:56 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Sep 2019 22:16:56 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Sep 2019 22:16:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.235]) with mapi id 14.03.0439.000; Wed, 4 Sep 2019 13:16:53 +0800 From: "Tu, Lijuan" To: "pvukkisala@marvell.com" , "dts@dpdk.org" CC: "avijay@marvell.com" , "fmasood@marvell.com" Thread-Topic: [dts] [PATCH] pmd: Add test case packet checking in scalar mode for marvell device Thread-Index: AQHVXKN+UxT//8SR50mpdEqLSGyIlacbBpzg Date: Wed, 4 Sep 2019 05:16:52 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB1BF3D@SHSMSX101.ccr.corp.intel.com> References: <1566888508-5477-1-git-send-email-pvukkisala@marvell.com> In-Reply-To: <1566888508-5477-1-git-send-email-pvukkisala@marvell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2Y1OThkYWMtM2YyNC00NGEyLWE4MmUtMDcwNTNmZTQ0MzlhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidFdQcEdwNkR3bUtkaTFkd0VQN0dUaHU0K3BSZVpHa2tsR3VQc2lETU1GV0tRcDZlaW5GK1wvUUM4b3NqY1M4RE8ifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of > pvukkisala@marvell.com > Sent: Tuesday, August 27, 2019 2:48 PM > To: dts@dpdk.org > Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala > > Subject: [dts] [PATCH] pmd: Add test case packet checking in scalar mode = for > marvell device >=20 > From: Phanendra Vukkisala >=20 > Updated testplan, test script and support list. >=20 > 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(-) >=20 > 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 ar= e > correctly forwarded and > if both RX and TX packet sizes match by `show port all stats` >=20 > +Test Case: Packet Checking in scalar mode > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The linuxapp is started with the following parameters: > + > +:: > + -c 0x6 -n 4 -w ,scalar_enable=3D1 -- -i --portmask=3D > + > + > +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 pack= et > sizes match. > + > + > Test Case: Descriptors Checking > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >=20 > 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) >=20 > + def test_packet_checking_scalar_mode(self): > + """ > + Packet forwarding checking test > + """ > + > + self.dut.kill_all() > + > + port_mask =3D utils.create_mask([self.dut_ports[0], > + self.dut_ports[1]]) > + > + eal_opts =3D "" > + for port in self.dut_ports: > + eal_opts +=3D "-w %s,scalar_enable=3D1 > + "%(self.dut.get_port_pci(self.dut_ports[port])) > + > + > + self.pmdout.start_testpmd("1S/2C/1T", "--portmask=3D%s" % port_m= ask, > eal_param =3D eal_opts, socket=3Dself.ports_socket) > + self.dut.send_expect("start", "testpmd> ") > + for size in self.frame_sizes: > + self.send_packet(size, scalar_test=3DTrue) > + > + 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 =3D self.pmdout.get_pmd_stats(portid) > return stats >=20 > - def send_packet(self, frame_size, checksum_test=3DFalse): > + def send_packet(self, frame_size, checksum_test=3DFalse, scalar_test= =3DFalse): > """ > Send 1 packet to portid > """ > @@ -428,10 +451,14 @@ class TestPmd(TestCase): > if checksum_test: > checksum =3D 'chksum=3D0x1' >=20 > + if scalar_test: > + pkt_count =3D 1 > + else: > + pkt_count =3D 4 > self.tester.scapy_foreground() > self.tester.scapy_append('nutmac=3D"%s"' % mac) > - self.tester.scapy_append('sendp([Ether(dst=3Dnutmac, > src=3D"52:00:00:00:00:00")/IP(len=3D%s)/UDP(%s)/Raw(load=3D"\x50"*%s)], > iface=3D"%s", count=3D4)' % ( > - load_size, checksum, padding, interface)) > + self.tester.scapy_append('sendp([Ether(dst=3Dnutmac, > src=3D"52:00:00:00:00:00")/IP(len=3D%s)/UDP(%s)/Raw(load=3D"\x50"*%s)], > iface=3D"%s", count=3D%s)' % ( > + load_size, checksum, padding, interface, pkt_count)) >=20 > out =3D 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 pack= ets" % > (p1rx_pkts, p0tx_pkts)) >=20 > - self.verify(p1rx_bytes =3D=3D (frame_size - 4)*4, > - "packet pass assert error, expected %d RX bytes, act= ual %d" % > ((frame_size - 4)*4, p1rx_bytes)) > + self.verify(p1rx_bytes =3D=3D (frame_size - 4)*pkt_count, > + "packet pass assert error, expected %d RX bytes, > + actual %d" % ((frame_size - 4)*pkt_count, p1rx_bytes)) >=20 > - self.verify(self.pmdout.check_tx_bytes(p0tx_bytes, (frame_size -= 4)*4), > - "packet pass assert error, expected %d TX bytes, act= ual %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)) >=20 > return out >=20 > -- > 1.7.9.5