From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 533687D3E for ; Thu, 24 Aug 2017 08:25:38 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 23:25:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,420,1498546800"; d="scan'208";a="893602757" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 23 Aug 2017 23:25:37 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 23:25:37 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 23:25:36 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.128]) by shsmsx102.ccr.corp.intel.com ([169.254.2.183]) with mapi id 14.03.0319.002; Thu, 24 Aug 2017 14:25:33 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "Xu, GangX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] fix userspace failed case Thread-Index: AQHTG+5usX0RH4BQDEWV1e4eKiS3OKKS3zYA//9884CAAJZYIP//huSAgACGzbD//4MwAAAQ0mNQ Date: Thu, 24 Aug 2017 06:25:32 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E6678A@SHSMSX101.ccr.corp.intel.com> References: <1503478919-86948-1-git-send-email-gangx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E665E0@SHSMSX101.ccr.corp.intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E66660@SHSMSX101.ccr.corp.intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E66723@SHSMSX101.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: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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 V1] fix userspace failed 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: Thu, 24 Aug 2017 06:25:40 -0000 Huilong, First, "scapy internal function for build packet and send packet" is not th= e root cause for stable issue. Scapy command line will call the same function. Second, IXIA and Trex can do function test as they can transmit/sniff packe= ts. There's one requirement that do function/performance cases in the same = setup. At last, let's close this discussion for it can't help us figure out what's= the root cause. Thanks, Marvin > -----Original Message----- > From: Xu, HuilongX > Sent: Thursday, August 24, 2017 2:18 PM > To: Liu, Yong ; Xu, GangX ; > dts@dpdk.org > Subject: RE: [dts] [PATCH V1] fix userspace failed case >=20 > Hi yong, > Yes, you are right, but for function test, we only should send/analyze > some packets(most of the time, we only send one packet) > For performance test, we need send packet stream and set send packet line > rate by ixia/trex or other tools. But whether use any tools, we should > Use unify interface, and the unify interface must use send packet tools > supplied default interface, not develop a new interface. Eg, set line rat= e > function, > In our unify interface maye is set_line_rate, but set_line_rate will use > ixia_set_line_rate or trex_set_line_rate, not develop a new > ixia_set_line_rate or trex_line_rate. Now packet mode in framework we use > scapy internal function for build packet and send packet, it is the root > case why packet mode not stable. > If we need use packet mode send packet for function, I think we can re- > develop packet model. In new packet mode, we can use send_packet for send > packet. > But send_packet shoud call sendp function from scpay, when use scapy, > use ixia_send_packet when use ixia. >=20 > Thanks a lot > -----Original Message----- > From: Liu, Yong > Sent: Thursday, August 24, 2017 1:50 PM > To: Xu, HuilongX ; Xu, GangX ; > dts@dpdk.org > Subject: RE: [dts] [PATCH V1] fix userspace failed case >=20 > > -----Original Message----- > > From: Xu, HuilongX > > Sent: Thursday, August 24, 2017 1:42 PM > > To: Liu, Yong ; Xu, GangX ; > > dts@dpdk.org > > Subject: RE: [dts] [PATCH V1] fix userspace failed case > > > > Hi, yong, > > Two comments as below, > > 1. use stat tools replace ls in next version 2. for use scapy replace > > packet mode. > > In this case, send packet very simple. We should use scapy default > > interface for send packet. > > Because it very steady, the log is clearness and friendly, the > > function interface in tester mode very simple also. >=20 > Agree with you, send/analyze packets by scapy is very simple. > But packet module is also very easy to use in transmission side. > Just two lines of code is needed. My option is that we should fix issue i= n > the module rather than just skip it. > And I prefer that packet module to be the default method. The reason is > that we can used it for other kinds generator like Trex/Ixia later. >=20 > > Thanks a lot > > -----Original Message----- > > From: Liu, Yong > > Sent: Thursday, August 24, 2017 1:00 PM > > To: Xu, HuilongX ; Xu, GangX > > ; dts@dpdk.org > > Subject: RE: [dts] [PATCH V1] fix userspace failed case > > > > Huilong, > > Comments inline. Thanks. > > > > > -----Original Message----- > > > From: Xu, HuilongX > > > Sent: Thursday, August 24, 2017 11:57 AM > > > To: Liu, Yong ; Xu, GangX ; > > > dts@dpdk.org > > > Subject: RE: [dts] [PATCH V1] fix userspace failed case > > > > > > Hi yong, > > > My comments as below. Could you check it? > > > > > > -----Original Message----- > > > From: Liu, Yong > > > Sent: Thursday, August 24, 2017 11:51 AM > > > To: Xu, GangX ; dts@dpdk.org > > > Cc: Xu, HuilongX > > > Subject: RE: [dts] [PATCH V1] fix userspace failed case > > > > > > Thanks gang, few comments below. > > > > > > > -----Original Message----- > > > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang > > > > Sent: Wednesday, August 23, 2017 5:02 PM > > > > To: dts@dpdk.org > > > > Cc: Xu, HuilongX > > > > Subject: [dts] [PATCH V1] fix userspace failed case > > > > > > > > From: "xu,huilong" > > > > > > > > update list: > > > > 1. update userspace example path for setup app 2. add sleep time > > > > for app update link status with fortville nic in port config case 3= . > > > > dpdk userspace tools dump eeprom file size different kernel > > > > ethtools dump, so only compare same size bytes 4. use scapy tool > > > > send packet replace packet model, because app can't received > > > > packet by use packet model > > > > > > > > Signed-off-by: xu,huilong > > > > --- > > > > tests/TestSuite_userspace_ethtool.py | 16 ++++++++++++---- > > > > 1 file changed, 12 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/tests/TestSuite_userspace_ethtool.py > > > > b/tests/TestSuite_userspace_ethtool.py > > > > index 937a9e5..1b234c1 100644 > > > > --- a/tests/TestSuite_userspace_ethtool.py > > > > +++ b/tests/TestSuite_userspace_ethtool.py > > > > @@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase, > > > > IxiaPacketGenerator): > > > > self.verify("Error" not in out, "compilation error 1") > > > > self.verify("No such file" not in out, "compilation error > > > > 2") > > > > > > > > - path =3D "./examples/ethtool/ethtool-app/ethtool- > > app/%s/ethtool" % > > > > self.target > > > > + path =3D "./examples/ethtool/ethtool-app/%s/ethtool" % > > > > + self.target > > > > self.cmd =3D "%s -c f -n %d" % (path, > > > > self.dut.get_memory_channels()) > > > > > > > > # pause frame basic configuration @@ -370,7 +370,10 @@ > > > > class TestUserspaceEthtool(TestCase, > > > > IxiaPacketGenerator): > > > > self.dut.send_expect("ethtool --eeprom-dump %s raw on > > > > > %s" % (intf, ethtool_eeprom), "# ") > > > > # wait for file ready > > > > time.sleep(2) > > > > - portinfo['ethtool_eeprom'] =3D ethtool_eeprom > > > > + # dpdk userspace dump eeprom-dump size different with > > > > + kernel > > > > ethtool dump eeprom-dump, so only compare same size bytes > > > > + dpdk_eeprom_size =3D int(self.dut.send_expect('ls - > all %s' > > > > + % > > > > portinfo['eeprom_file'], '# ').split(' ')[4].strip()) > > > > > > There is one more simple command to get file size. > > > "stat -c %s" > > > Stat command is default tools in all linux os?, if yes, I think can > > > use stat command replace ls. > > > > Stat command is belong to GNU coreutils. "ls" also in the same package. > > It will be fine to utilize stat command. > > > > > > + self.dut.send_expect('dd if=3D%s of=3D%s bs=3D%d count= =3D1' % > > > > (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index, > > > > dpdk_eeprom_size), > > > > "#") > > > > + portinfo['ethtool_eeprom'] =3D > "ethtool_eeprom_%d_cat.bin" > > > > + % > > > > index > > > > # bind to original driver > > > > > > > > portinfo['net_dev'].bind_driver(portinfo['ori_driver']) > > > > > > > > @@ -394,10 +397,12 @@ class TestUserspaceEthtool(TestCase, > > > > IxiaPacketGenerator): > > > > rx_ring, _, tx_ring, _ =3D self.strip_ringparam(index) > > > > self.verify(rx_ring =3D=3D rx_max, "Userspace tool fai= led > > > > to set Rx ring parameter") > > > > self.verify(tx_ring =3D=3D tx_max, "Userspace tool fai= led > > > > to set Tx ring parameter") > > > > - 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) > > > > + # use scapy send packet, because example can't > > > > + receive packet > > > > by packet model > > > > + packet =3D > > > > r'sendp([Ether(dst=3D"ff:ff:ff:ff:ff:ff")/IP()/UDP()/Raw()], > > > > iface=3D"%s")' % intf > > > > + self.tester.scapy_append(packet) > > > > + self.tester.scapy_execute() > > > > > > The only difference I can see is the destination mac address. > > > Could you please try again with below code? > > > I review packet mode, if destination mac address not set in packet > mode. > > > Packet model will set default destination mac address is > > > "ff:ff:ff:ff:ff:ff", So I think not try again pkt with > > > "ff:ff:ff:ff:ff:ff" destination mac address. > > > > > > > I'm wondering that if any bug in packet module which can cause this > issue. > > packet module will call the same API as scapy cli. > > > > > pkt.config_layer('ether', {'dst': 'ff:ff:ff:ff:ff:ff'}) > > > > > > > rx_pkts, tx_pkts =3D self.strip_portstats(index) > > > > self.verify(rx_pkts =3D=3D ori_rx_pkts + 1, "Failed to > > > > forward after ring parameter changed") > > > > self.dut.send_expect("quit", "# ") @@ -499,8 +504,11 > > > > @@ class TestUserspaceEthtool(TestCase, > > > > IxiaPacketGenerator): > > > > for index in range(len(self.ports)): > > > > port =3D self.ports[index] > > > > ori_rx_pkts, _ =3D self.strip_portstats(index) > > > > + # add sleep time for example update port link status > > > > + time.sleep(10) > > > > # stop port > > > > self.dut.send_expect("stop %d" % index, "EthApp>") > > > > + time.sleep(10) > > > > # check packet not forwarded when port is stop > > > > pkt =3D Packet() > > > > tester_port =3D self.tester.get_local_port(port) > > > > -- > > > > 1.9.3