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 89406A0554; Tue, 18 Feb 2020 06:17:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7BE001DA0A; Tue, 18 Feb 2020 06:17:38 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6FB471D8FF for ; Tue, 18 Feb 2020 06:17:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 21:17:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="433976598" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 17 Feb 2020 21:17:35 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 21:17:35 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 21:17:35 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.225]) with mapi id 14.03.0439.000; Tue, 18 Feb 2020 13:17:33 +0800 From: "Tu, Lijuan" To: "Zeng, XiaoxiaoX" , "dts@dpdk.org" CC: "Zeng, XiaoxiaoX" Thread-Topic: [dts] [PATCH V4] tests/port_control:modify e1000 part Thread-Index: AQHVzQjwGvowhWzbeEGnYfF8ptZuyaggm1fQ Date: Tue, 18 Feb 2020 05:17:32 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCB385@SHSMSX101.ccr.corp.intel.com> References: <1579246638-172212-1-git-send-email-xiaoxiaox.zeng@intel.com> In-Reply-To: <1579246638-172212-1-git-send-email-xiaoxiaox.zeng@intel.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-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 V4] tests/port_control:modify e1000 part 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 Zeng Xiaoxiao > Sent: Friday, January 17, 2020 3:37 PM > To: dts@dpdk.org > Cc: Zeng, XiaoxiaoX > Subject: [dts] [PATCH V4] tests/port_control:modify e1000 part >=20 > *.e1000 device not support port stop and port reset. >=20 > Signed-off-by: Zeng Xiaoxiao > --- > tests/TestSuite_port_control.py | 22 +++++++++++++++------- > 1 file changed, 15 insertions(+), 7 deletions(-) >=20 > diff --git a/tests/TestSuite_port_control.py b/tests/TestSuite_port_contr= ol.py > index f006ddb..8d63fe7 100644 > --- a/tests/TestSuite_port_control.py > +++ b/tests/TestSuite_port_control.py > @@ -82,7 +82,6 @@ class TestPortControl(TestCase): > self.host_intf =3D self.dut.ports_info[self.used_dut_port]['intf= '] > self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 1, > driver=3Ddriver) > self.sriov_vfs_port =3D self.dut.ports_info[self.used_dut_port][= 'vfs_port'] > - self.dut.send_expect("ip link set %s vf 0 mac %s" % (self.host_i= ntf, > self.vf_mac), "# ") > try: > for port in self.sriov_vfs_port: > port.bind_driver(self.vf_assign_method) > @@ -95,6 +94,8 @@ class TestPortControl(TestCase): > self.vm_dut =3D self.vm.start() > if self.vm_dut is None: > raise Exception("Set up VM ENV failed!") > + else: > + self.start_vf_pmd(self.vm_dut) >=20 > self.vm_testpmd =3D PmdOutput(self.vm_dut) >=20 > @@ -148,6 +149,17 @@ class TestPortControl(TestCase): > if driver !=3D driver_now: > netdev.bind_driver(driver=3Ddriver) >=20 > + def start_vf_pmd(self, terminal): > + > + drive_info =3D terminal.send_expect("./usertools/dpdk-devbind.py= -s", > "#") > + vf_if =3D re.findall(r"if=3D(\w+)", drive_info.split("kernel")[1= ]) > + vf_pci =3D re.findall(r"(\d+.\d+.\d+.\d+)", drive_info.split("ke= rnel")[1]) > + terminal.send_expect("ifconfig %s hw ether %s" % (vf_if[1], > self.vf_mac), "#") > + terminal.send_expect("ifconfig %s up" % vf_if[1], "#") > + terminal.send_expect("./usertools/dpdk-devbind.py -b %s %s" % > (self.pf_default_driver, vf_pci[1]), "#") > + cmd =3D "./%s/app/testpmd -n 1 -w %s -- -i" % (self.target, vf_p= ci[1]) > + terminal.send_expect(cmd, "testpmd>", 10) > + > def start_testpmd(self, terminal): > terminal.start_testpmd(ports=3D[0], socket=3Dself.socket) > res =3D terminal.wait_link_status_up('all', timeout=3D5) @@ -166= ,7 +178,7 > @@ class TestPortControl(TestCase): > terminal.execute_cmd("stop") > terminal.execute_cmd("port stop all") > ret =3D terminal.get_port_link_status(self.port_id_0) > - if self.nic.startswith('columbiaville'): > + if self.nic.startswith('columbiaville') or terminal is self.vm_t= estpmd: > self.verify(ret !=3D "", "port status error!") > else: > self.verify(ret =3D=3D "down", "port not down!") @@ -174,7 += 186,7 @@ > class TestPortControl(TestCase): > def reset_pmd_port(self, terminal): > terminal.execute_cmd("port reset all") > ret =3D terminal.get_port_link_status(self.port_id_0) > - if self.nic.startswith('columbiaville'): > + if self.nic.startswith('columbiaville') or terminal is self.vm_t= estpmd: > self.verify(ret !=3D "", "port status error!") > else: > self.verify(ret =3D=3D "down", "port not down!") @@ -230,19 = +242,15 @@ > class TestPortControl(TestCase): >=20 > def test_e1000_start_stop_reset_close(self): > self.setup_vm_env() > - self.start_testpmd(self.vm_testpmd) > # start port > self.start_pmd_port(self.vm_testpmd) > - self.send_and_verify_packets(self.vm_testpmd) > # stop port and start port > self.stop_pmd_port(self.vm_testpmd) > self.start_pmd_port(self.vm_testpmd) > - self.send_and_verify_packets(self.vm_testpmd) > # reset port > self.stop_pmd_port(self.vm_testpmd) > self.reset_pmd_port(self.vm_testpmd) > self.start_pmd_port(self.vm_testpmd) > - self.send_and_verify_packets(self.vm_testpmd) > # close all port > self.stop_pmd_port(self.vm_testpmd) > self.close_pmd_port(self.vm_testpmd) > -- > 1.8.3.1