From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0EB86374C for ; Wed, 4 May 2016 19:13:45 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 04 May 2016 10:13:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,578,1455004800"; d="scan'208";a="958890889" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 04 May 2016 10:13:45 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 May 2016 10:13:44 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 May 2016 10:13:44 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.148]) with mapi id 14.03.0248.002; Thu, 5 May 2016 01:13:42 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case Thread-Index: AQHRnF1C604LCNwOh06TOLLH3mHwiZ+hRKsggAU8ZECAApYyIA== Date: Wed, 4 May 2016 17:13:41 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E14F1B175@SHSMSX103.ccr.corp.intel.com> References: <1461304956-20509-1-git-send-email-huilongx.xu@intel.com> <1461304956-20509-2-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E14F0B078@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTZjMGE5ZTUtYzhmMS00NTQ5LTgzNTgtYWMwMGIwYjcxMWU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhvODJRajNVSk5qSlR0RDhkcHMraEJtSGVqaytxN2xkXC9XdnVYcmhBcjBvPSJ9 x-ctpclassification: CTP_IC 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 V2][dts 2/2] add allmutlicast and broadcast test case 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: Wed, 04 May 2016 17:13:46 -0000 Thanks, please modify failure reason as requested. > -----Original Message----- > From: Xu, HuilongX > Sent: Monday, May 02, 2016 6:49 PM > To: Liu, Yong; dts@dpdk.org > Subject: RE: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast tes= t > case >=20 > Please see my comments. >=20 > > -----Original Message----- > > From: Liu, Yong > > Sent: Saturday, April 30, 2016 1:48 AM > > To: Xu, HuilongX; dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: RE: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast > > test case > > > > Thanks, one question below. > > > > > -----Original Message----- > > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > > Sent: Thursday, April 21, 2016 11:03 PM > > > To: dts@dpdk.org > > > Cc: Xu, HuilongX > > > Subject: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast tes= t > > > case > > > > > > Signed-off-by: xu,huilong > > > --- > > > tests/TestSuite_dynamic_config.py | 69 > > ++++++++++++++++++++++++++++++++-- > > > ----- > > > 1 file changed, 58 insertions(+), 11 deletions(-) > > > > > > diff --git a/tests/TestSuite_dynamic_config.py > > > b/tests/TestSuite_dynamic_config.py > > > index ba740b1..380fa6d 100644 > > > --- a/tests/TestSuite_dynamic_config.py > > > +++ b/tests/TestSuite_dynamic_config.py > > > @@ -1,6 +1,6 @@ > > > # BSD LICENSE > > > # > > > -# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. > > > +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved. > > > # All rights reserved. > > > # > > > # Redistribution and use in source and binary forms, with or without > > > @@ -67,18 +67,12 @@ class TestDynamicConfig(TestCase): > > > print self.dut_ports > > > > > > # Verify that enough ports are available > > > - if self.nic in ["fortville_eagle", "fortville_spirit", > > > "fortville_spirit_single"]: > > > - self.verify(len(self.dut_ports) >=3D 2, "Insufficient > > ports") > > > - else: > > > - self.verify(len(self.dut_ports) >=3D 1, "Insufficient > > ports") > > > + self.verify(len(self.dut_ports) >=3D 2, "Insufficient ports"= ) > > > > > > # Prepare cores and ports > > > cores =3D self.dut.get_core_list('1S/2C/2T') > > > coreMask =3D dts.create_mask(cores) > > > - if self.nic in ["fortville_eagle", "fortville_spirit", > > > "fortville_spirit_single"]: > > > - portMask =3D dts.create_mask(self.dut_ports[:2]) > > > - else: > > > - portMask =3D dts.create_mask([self.dut_ports[0]]) > > > + portMask =3D dts.create_mask(self.dut_ports[:2]) > > > > One question here, is this case must need two ports? Reduce port > > requirement is our long time strategy. > > It will benefit for some NIC which only one port available. > Huilong's comments: > One port received a packet, and the packet info not any changed, then > send this packet by itself. > Some nic not support this scenario. Example Fortville nic. > > > > > > > > # launch app > > > cmd =3D "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i -- > > rxpt=3D0 > > > \ > > > @@ -99,8 +93,7 @@ class TestDynamicConfig(TestCase): > > > self.verify(cmp(ret.lower(), self.dest) =3D=3D 0, "MAC addre= ss > > wrong") > > > self.verify("Promiscuous mode: enabled" in out, > > > "wrong default promiscuous value") > > > - if self.nic in ["fortville_eagle", "fortville_spirit", > > > "fortville_spirit_single"]: > > > - self.dut.send_expect("start", "testpmd> ", 120) > > > + self.dut.send_expect("start", "testpmd> ", 120) > > > > > > def dynamic_config_send_packet(self, portid, > > > destMac=3D"00:11:22:33:44:55"): > > > """ > > > @@ -129,6 +122,7 @@ class TestDynamicConfig(TestCase): > > > portid =3D self.dut_ports[0] > > > > > > # get the current rx statistic > > > + out =3D self.dut.send_expect("clear port stats all" , "testp= md> > > ") > > > out =3D self.dut.send_expect("show port stats %d" % portid, > > > "testpmd> ") > > > cur_rxpkt =3D dts.regexp(out, "RX-packets: ([0-9]+)") > > > > > > @@ -211,7 +205,60 @@ class TestDynamicConfig(TestCase): > > > # check the pakcet increasment > > > self.verify(int(cur_rxpkt) =3D=3D int( > > > pre_rxpkt) + 1, "2nd packet increasment error") > > > + def test_dynamic_config_broadcast(self): > > > + """ > > > + Dynamic config disable promiscuous, send a broadcast packet > > > + dpdk will received packet and fwd by io model. send a genera= l > > > packet > > > + and dst mac not port mac, dpdk will not received packet. > > > + """ > > > + > > > + self.dut.send_expect("set promisc all off", "testpmd> ") > > > + self.dut.send_expect("set fwd io", "testpmd> ") > > > + self.dut.send_expect("clear port stats all", "testpmd> ") > > > + > > > + > > > self.dynamic_config_send_packet(self.dut_ports[0],"ff:ff:ff:ff:ff:ff"= ) > > > + out =3D self.dut.send_expect( > > > + "show port stats %d" % self.dut_ports[1], "testpmd> ") > > > + > > > + cur_rxpkt =3D dts.regexp(out, "TX-packets: ([0-9]+)") > > > + self.verify(int(cur_rxpkt) =3D=3D 1, "1st packet increasment > > error") > > > + > > > + self.dut.send_expect("clear port stats all", "testpmd> ") > > > + > > > + self.dynamic_config_send_packet(self.dut_ports[0]) > > > + out =3D self.dut.send_expect( > > > + "show port stats %d" % self.dut_ports[1], "testpmd> ") > > > + > > > + cur_rxpkt =3D dts.regexp(out, "TX-packets: ([0-9]+)") > > > + self.verify(int(cur_rxpkt) =3D=3D 0, "2st packet increasment > > error") > > > + > > > + def test_dynamic_config_allmulticast(self): > > > + """ > > > + Dynamic config disable promiscuous,when dpdk enable multicas= t, > > > send a > > > + mulicast packet, dpdk received this packet and fwd by io > > model. > > > when dpdk > > > + disable multicast, dpdk not received this packet > > > + """ > > > + > > > + self.dut.send_expect("set promisc all off", "testpmd> ") > > > + self.dut.send_expect("set fwd io", "testpmd> ") > > > + self.dut.send_expect("clear port stats all", "testpmd> ") > > > + self.dut.send_expect("set allmulti all on", "testpmd> ") > > > + > > > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01"= ) > > > + out =3D self.dut.send_expect( > > > + "show port stats %d" % self.dut_ports[1], "testpmd> ") > > > + > > > + cur_rxpkt =3D dts.regexp(out, "TX-packets: ([0-9]+)") > > > + self.verify(int(cur_rxpkt) =3D=3D 1, "1st packet increasment > > error") The failure reason is not very clear, please changed something like "Can't = receive multicast packet as expected."=20 > > > + > > > + self.dut.send_expect("clear port stats all", "testpmd> ") > > > + self.dut.send_expect("set allmulti all off", "testpmd> ") > > > + > > > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01"= ) > > > + out =3D self.dut.send_expect( > > > + "show port stats %d" % self.dut_ports[1], "testpmd> ") > > > > > > + cur_rxpkt =3D dts.regexp(out, "TX-packets: ([0-9]+)") > > > + self.verify(int(cur_rxpkt) =3D=3D 0, "2st packet increasment > > error") The same as previous one. > > > + > > > def test_dynamic_config_enable_promiscuous(self): > > > """ > > > Dynamic config enable promiscuous test > > > -- > > > 1.9.3