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 A7176A0096 for ; Wed, 5 Jun 2019 07:39:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 667151B945; Wed, 5 Jun 2019 07:39:58 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B7FCD4D27 for ; Wed, 5 Jun 2019 07:39:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 22:39:54 -0700 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 04 Jun 2019 22:39:53 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 4 Jun 2019 22:39:53 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 4 Jun 2019 22:39:53 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.10]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.187]) with mapi id 14.03.0415.000; Wed, 5 Jun 2019 13:39:51 +0800 From: "Tu, Lijuan" To: "nareddy@marvell.com" , "dts@dpdk.org" CC: "fmasood@marvell.com" , "avijay@marvell.com" Thread-Topic: [dts] [PATCH] TestSuite_userspace_ethtool.py: Modified send packet count to support vector mode Thread-Index: AQHVGrDn7S9lgfDC6E2wSko8RhC1cKaMjMqA Date: Wed, 5 Jun 2019 05:39:51 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAA1A0A@SHSMSX101.ccr.corp.intel.com> References: <1559637483-4193-1-git-send-email-nareddy@marvell.com> In-Reply-To: <1559637483-4193-1-git-send-email-nareddy@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.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjk2MzE2MjctNzFhMi00NzE5LTkxZjYtNmUyYjY1ZGNiZmRlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK3dXd1dLazczb0dDdlRYWmNNajlVcmRWOVlsdzBiRFJ6eWFTeWtaZEJDdkRla2g2NTVocnNIcllLNFNSZUlNbSJ9 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] TestSuite_userspace_ethtool.py: Modified send packet count to support 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of > nareddy@marvell.com > Sent: Tuesday, June 4, 2019 4:38 PM > To: dts@dpdk.org > Cc: fmasood@marvell.com; avijay@marvell.com; Praneeth Reddy > > Subject: [dts] [PATCH] TestSuite_userspace_ethtool.py: Modified send pack= et > count to support vector mode >=20 > From: Praneeth Reddy >=20 > In vector mode minimum of 4 packets are required to forward. > Added packet count as 4 whenever sending a packet from scapy. >=20 > Signed-off-by: Praneeth Reddy > --- > tests/TestSuite_userspace_ethtool.py | 34 +++++++++++++++++-------------= ---- > 1 file changed, 17 insertions(+), 17 deletions(-) >=20 > diff --git a/tests/TestSuite_userspace_ethtool.py > b/tests/TestSuite_userspace_ethtool.py > index f8428ea..6c19f75 100644 > --- a/tests/TestSuite_userspace_ethtool.py > +++ b/tests/TestSuite_userspace_ethtool.py > @@ -297,10 +297,10 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > ori_rx_pkts, ori_tx_pkts =3D self.strip_portstats(port) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > time.sleep(1) > rx_pkts, tx_pkts =3D self.strip_portstats(port) > - self.verify((rx_pkts =3D=3D (ori_rx_pkts + 1)), "Failed to r= ecord Rx/Tx > packets") > + self.verify((rx_pkts =3D=3D (ori_rx_pkts + 4)), "Failed to > + record Rx/Tx packets") >=20 > self.dut.send_expect("quit", "# ") > # Check port link down verification result @@ -412,9 +412,9 @@ c= lass > TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > pkt =3D Packet() > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts, tx_pkts =3D self.strip_portstats(index) > - self.verify(rx_pkts =3D=3D ori_rx_pkts + 1, "Failed to forwa= rd after ring > parameter changed") > + self.verify(rx_pkts =3D=3D ori_rx_pkts + 4, "Failed to forwa= rd > + after ring parameter changed") > self.dut.send_expect("quit", "# ") >=20 > def test_ethtool_vlan(self): > @@ -444,15 +444,15 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > pkt.config_layer('vlan', {'vlan': vlan}) > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts, tx_pkts =3D self.strip_portstats(port) > - self.verify(rx_pkts =3D=3D ori_rx_pkts + 1, "Failed to Rx vl= an packet") > - self.verify(tx_pkts =3D=3D ori_tx_pkts + 1, "Failed to Tx vl= an packet") > + self.verify(rx_pkts =3D=3D ori_rx_pkts + 4, "Failed to Rx vl= an packet") > + self.verify(tx_pkts =3D=3D ori_tx_pkts + 4, "Failed to Tx vl= an > + packet") >=20 > # send incorrect vlan packet to port > wrong_vlan =3D (vlan + 1) % 4096 > pkt.config_layer('vlan', {'vlan': wrong_vlan}) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > time.sleep(2) > rx_pkts_wrong, tx_pkts_wrong =3D self.strip_portstats(port) > self.verify(tx_pkts_wrong =3D=3D rx_pkts, "Failed to filter = Rx vlan packet") > @@ -461,7 +461,7 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > self.dut.send_expect("vlan %d del %d" % (index, vlan), "EthA= pp>") > # send same packet and make sure not received > pkt.config_layer('vlan', {'vlan': vlan}) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > time.sleep(2) > rx_pkts_del, tx_pkts_del =3D self.strip_portstats(port) > self.verify(tx_pkts_del =3D=3D rx_pkts, "Failed to remove Rx= vlan filter") > @@ -491,9 +491,9 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > intf =3D self.tester.get_interface(tester_port) > # send and sniff packet > inst =3D self.tester.tcpdump_sniff_packets(intf, timeout=3D5= ) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > pkts =3D self.tester.load_tcpdump_sniff_packets(inst) > - self.verify(len(pkts) =3D=3D 1, "Packet not forwarded as exp= ected") > + self.verify(len(pkts) =3D=3D 4, "Packet not forwarded as > + expected") > src_mac =3D pkts[0].strip_layer_element("layer2", "src") > self.verify(src_mac =3D=3D valid_mac, "Forwarded packet not = match > default mac") >=20 > @@ -525,7 +525,7 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > pkt =3D Packet() > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts, tx_pkts =3D self.strip_portstats(index) > self.verify(rx_pkts =3D=3D ori_rx_pkts, "Failed to stop port= ") > # restart port and check packet can normally forwarded @@ -5= 34,10 > +534,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > # wait few time for port ready > rx_pkts, tx_pkts =3D self.strip_portstats(index) > time.sleep(2) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts_open, tx_pkts_open =3D self.strip_portstats(index) > - self.verify(rx_pkts_open =3D=3D rx_pkts + 1, "Failed to reop= en port rx") > - self.verify(tx_pkts_open =3D=3D tx_pkts + 1, "Failed to reop= en port tx") > + self.verify(rx_pkts_open =3D=3D rx_pkts + 4, "Failed to reop= en port rx") > + self.verify(tx_pkts_open =3D=3D tx_pkts + 4, "Failed to reop= en > + port tx") >=20 > self.dut.send_expect("quit", "# ") >=20 > @@ -565,11 +565,11 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > ori_rx_pkts, _ =3D self.strip_portstats(index) > pkt_size =3D mtu + HEADER_SIZE['eth'] > pkt =3D Packet(pkt_len=3Dpkt_size) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts, _ =3D self.strip_portstats(index) > self.verify(rx_pkts =3D=3D ori_rx_pkts + 1, "Packet matc= h mtu not > forwarded as expected") > pkt =3D Packet(pkt_len=3Dmtu + 1 + HEADER_SIZE['eth']) > - pkt.send_pkt(tx_port=3Dintf) > + pkt.send_pkt(tx_port=3Dintf, count=3D4) > rx_pkts_over, _ =3D self.strip_portstats(index) > self.verify(rx_pkts =3D=3D rx_pkts_over, "Packet over mt= u should not be > forwarded") >=20 > -- > 1.8.3.1