From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5FBE4DE0 for ; Mon, 6 Jul 2015 09:07:03 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 06 Jul 2015 00:06:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,413,1432623600"; d="scan'208";a="756676950" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2015 00:06:41 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 6 Jul 2015 15:06:40 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.246]) with mapi id 14.03.0224.002; Mon, 6 Jul 2015 15:06:39 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] fix queue start stop case failed for fovtille nic Thread-Index: AQHQt7jAiDR06cBhIEKbbhWOa6Tz2J3OA4gQ Date: Mon, 6 Jul 2015 07:06:38 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E591A8@SHSMSX103.ccr.corp.intel.com> References: <1436165704-3805-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1436165704-3805-1-git-send-email-huilongx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] fix queue start stop case failed for fovtille nic 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: Mon, 06 Jul 2015 07:07:04 -0000 Huilong, We'd better not change the dpdk code directly. If this case need to check w= hether receive packets as expected, we can use "set fwd rxonly; set verbose= =3D1" for replacement. Also dpdk code may be not in /root/dpdk, we can change base dir and test su= ite can operate on dpdk extracted to "self.dut.base_dir".=20 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu > Sent: Monday, July 06, 2015 2:55 PM > To: dts@dpdk.org > Subject: [dts] fix queue start stop case failed for fovtille nic >=20 > From: huilong xu >=20 >=20 > Signed-off-by: huilong xu > --- > tests/TestSuite_queue_start_stop.py | 21 ++++++++++----------- > 1 files changed, 10 insertions(+), 11 deletions(-) >=20 > diff --git a/tests/TestSuite_queue_start_stop.py > b/tests/TestSuite_queue_start_stop.py > index 41777ac..3692aca 100644 > --- a/tests/TestSuite_queue_start_stop.py > +++ b/tests/TestSuite_queue_start_stop.py > @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase): >=20 > self.tester.scapy_foreground() >=20 > - if self.nic in ["fortville_eagle", "fortville_spirit", > - "fortville_spirit_single", "bartonhills", > - "powerville", "springville", "hartwell"]: > - pktlen =3D pktSize - 22 > - else: > - pktlen =3D pktSize - 18 > + pktlen =3D pktSize - 14 > padding =3D pktlen - 20 > - > self.tester.scapy_append('sendp([Ether(dst=3D"%s")/IP()/Raw(load=3D"\x50"= *%s)], > iface=3D"%s")' % (mac, padding, txitf)) > + > self.tester.scapy_append('sendp([Ether(dst=3D"%s")/IP()/Raw(load=3D"P"*%s= )], > iface=3D"%s")' % (mac, padding, txitf)) >=20 > self.tester.scapy_execute() > time.sleep(3) >=20 > out =3D self.tester.scapy_get_result() > if received: > - self.verify('\x50\x50\x50' in out, "start queue failed") > + self.verify('PPP' in out, "start queue failed") > else: > - self.verify('\x50\x50\x50' not in out, "stop queue failed") > + self.verify('PPP' not in out, "stop queue failed") >=20 > def add_code_to_dpdk(self, file_name, standard_row, add_rows, > offset=3D0): > """ > @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase): > """ > queue start/stop test for fortville nic > """ > - fwdmac_file =3D os.getcwd() + r'/dep/dpdk/app/test-pmd/macfwd.c' > + self.dut.session.copy_file_from(r'/root/dpdk/app/test- > pmd/macfwd.c') > + fwdmac_file =3D 'macfwd.c' > printf_lines =3D ['printf("ports %u queue %u revice %u packages"= , > fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"] > sourcelines =3D self.add_code_to_dpdk(fwdmac_file, > r'(unlikely(nb_rx =3D=3D 0)', printf_lines, 2) > self.dut.session.copy_file_to(fwdmac_file) > self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test- > pmd/macfwd.c', "#") > self.dut.build_dpdk_apps('./app/test-pmd') >=20 > - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i", > "testpmd>", 120) > + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i -= - > portmask=3D0x3", "testpmd>", 120) > self.dut.send_expect("set fwd mac", "testpmd>") > self.dut.send_expect("start", "testpmd>") > self.check_forwarding([0, 1], self.nic) > @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase): > self.dut.send_expect("port 1 txq 0 start", "testpmd>") > self.dut.send_expect("start", "testpmd>") > self.check_forwarding([0, 1], self.nic) > + self.dut.send_expect("quit", "testpmd>") >=20 > # recover testpmd changed > file_handel =3D open(fwdmac_file, "w") > file_handel.writelines(sourcelines) > file_handel.close() > + self.dut.session.copy_file_to(fwdmac_file) > + self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test- > pmd/macfwd.c', "#") >=20 > def tear_down(self): > """ > -- > 1.7.4.4