From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C9FC458CB for ; Fri, 1 Sep 2017 03:44:08 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 31 Aug 2017 18:44:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,456,1498546800"; d="scan'208";a="1213256022" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 31 Aug 2017 18:44:07 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 Aug 2017 18:44:07 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 Aug 2017 18:44:06 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.168]) with mapi id 14.03.0319.002; Fri, 1 Sep 2017 09:44:04 +0800 From: "Liu, Yong" To: "Xie, BeibeiX" , "dts@dpdk.org" CC: "Xu, Qian Q" Thread-Topic: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08 Thread-Index: AQHTIj+/5NIwWsPGe0+8XlU/wXbQUKKfQqqw Date: Fri, 1 Sep 2017 01:44:04 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E97E71@SHSMSX103.ccr.corp.intel.com> References: <1504173577-106063-1-git-send-email-beibeix.xie@intel.com> In-Reply-To: <1504173577-106063-1-git-send-email-beibeix.xie@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.0.0.116 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 V2] tests/vf_kernel:adjust to dpdk17.08 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: Fri, 01 Sep 2017 01:44:09 -0000 Beibei, Could you please give the bug id for this issue? We should not modify overa= ll test plan without any approval. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xie,beibei > Sent: Thursday, August 31, 2017 6:00 PM > To: dts@dpdk.org > Cc: Xie, BeibeiX > Subject: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08 >=20 > In the dpdk pf + kernel vf test,it may have some unknown problems > for frequent start the testpmd on PF device ,so the developer suggest > only one time to start testpmd on PF device. >=20 >=20 > Signed-off-by: xie,beibei > --- > tests/TestSuite_vf_kernel.py | 79 ++++++++++----------------------------= - > ----- > 1 file changed, 18 insertions(+), 61 deletions(-) >=20 > diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py > index fa89379..204467d 100644 > --- a/tests/TestSuite_vf_kernel.py > +++ b/tests/TestSuite_vf_kernel.py > @@ -76,10 +76,8 @@ class TestVfKernel(TestCase): > """ > Run before each test case. > """ > - self.start_pf_vf() > self.verify(self.check_pf_vf_link_status( > self.vm0_dut, self.vm0_intf0), "vf link down") > - > pass >=20 > def generate_pcap_pkt(self, macs, pktname=3D'flow.pcap'): > @@ -116,6 +114,7 @@ class TestVfKernel(TestCase): > # so finally the pool will be full, then no more packet will be > # received by VF > self.dut_testpmd.execute_cmd("start") > + time.sleep(5) >=20 > vf0_prop_1 =3D {'opt_host': self.sriov_vfs_port[0].pci} > vf0_prop_2 =3D {'opt_host': self.sriov_vfs_port[1].pci} > @@ -180,8 +179,6 @@ class TestVfKernel(TestCase): > self.vm0_dut.send_expect("systemctl stop NetworkManager", "# ", > 60) > self.vm1_dut.send_expect("systemctl stop NetworkManager", "# ", > 60) >=20 > - self.dut_testpmd.quit() > - > def destroy_vm_env(self): > """ > destroy vm environment > @@ -216,26 +213,13 @@ class TestVfKernel(TestCase): > self.vm0_dut.send_expect("ifconfig %s up" % self.vm0_intf0, > "#") > out =3D self.vm0_dut.send_expect("ethtool %s" % self.vm0_int= f0, > "#") > self.verify("Link detected: yes" in out, "Wrong link status"= ) > + time.sleep(3) >=20 > # pf up + vf down -> vf down > self.vm0_dut.send_expect("ifconfig %s down" % self.vm0_intf0= , > "#") > out =3D self.vm0_dut.send_expect("ethtool %s" % self.vm0_int= f0, > "#") > self.verify("Link detected: no" in out, "Wrong link status") > - > - self.dut_testpmd.quit() > - # pf down + vf up -> vf down > - self.vm0_dut.send_expect("ifconfig %s up" % self.vm0_intf0, > "#") > - out =3D self.vm0_dut.send_expect("ethtool %s" % self.vm0_int= f0, > "#") > - self.verify("Link detected: no" in out, "Wrong link status") > - > - # pf down + vf down -> vf down > - self.vm0_dut.send_expect("ifconfig %s down" % self.vm0_intf0= , > "#") > - out =3D self.vm0_dut.send_expect("ethtool %s" % self.vm0_int= f0, > "#") > - self.verify("Link detected: no" in out, "Wrong link status") > - > - self.start_pf_vf() > - self.verify(self.check_pf_vf_link_status( > - self.vm0_dut, self.vm0_intf0), "vf link down") > + time.sleep(3) >=20 > def ping4(self, session, intf, ipv4): > """ > @@ -295,8 +279,6 @@ class TestVfKernel(TestCase): > "ifconfig %s 0.0.0.0" % self.vm0_intf1, "#") > self.tester.send_expect("ifconfig %s 0.0.0.0" % > self.tester_intf, "#") > - self.dut_testpmd.quit() > - self.start_pf_vf() >=20 > def test_reset(self): > """ > @@ -320,8 +302,6 @@ class TestVfKernel(TestCase): > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf0, > vm0_vf0_mac), "Unload VF1 > kernel driver impact VF0") >=20 > - self.dut_testpmd.quit() > - self.start_pf_vf() > self.verify(self.check_pf_vf_link_status( > self.vm0_dut, self.vm0_intf0), "vm0_vf0 link down") >=20 > @@ -343,6 +323,7 @@ class TestVfKernel(TestCase): > vm0_vf0_mac =3D self.vm0_dut.ports_info[0]['port'].get_mac_addr(= ) > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf0, > vm0_vf0_mac), "Reset VF1 > kernel driver impact VF0") > + self.vm1_dut.send_expect("modprobe %svf" % self.kdriver, "#") >=20 > def test_address(self): > """ > @@ -356,6 +337,7 @@ class TestVfKernel(TestCase): > "ifconfig %s %s netmask 255.255.255.0" % (self.vm0_intf0, > vm0_ip0), "#") > self.tester.send_expect( > "ifconfig %s %s netmask 255.255.255.0" % (self.tester_intf, > pf_ip), "#") > + > # pf ping vm0_vf0 > self.verify(self.ping4(self.tester, self.tester_intf, vm0_ip0), > "%s ping %s failed" % (self.tester_intf, vm0_ip0)) > @@ -434,6 +416,7 @@ class TestVfKernel(TestCase): > # Send packet from tester to VF MAC with not-matching vlan id, > check > # the packet can't be received at the vlan device > wrong_vlan =3D vlan_ids % 4095 + 1 > + > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf0, > vm0_vf0_mac, > vlan_id=3D'%d' % wrong_vlan) = =3D=3D > False, "received wrong vlan packet") >=20 > @@ -462,7 +445,7 @@ class TestVfKernel(TestCase): > """ > verify packet statistic > """ > - > + time.sleep(10) > out =3D self.vm0_dut.send_expect("ethtool -S %s" % self.vm0_intf= 0, > "#") > rx_packets_before =3D re.findall("\s*rx.*packets:\s*(\d*)", out) > nb_rx_pkts_before =3D 0 > @@ -482,21 +465,6 @@ class TestVfKernel(TestCase): > self.verify(nb_rx_pkts_after =3D=3D 10 + nb_rx_pkts_before, > "rx_packets calculate error") >=20 > - def start_pf_vf(self): > - """ > - know issue DPDK-2208. dpdk-2849 > - """ > - self.dut_testpmd.start_testpmd( > - "Default", "--rxq=3D4 --txq=3D4 --port-topology=3Dchained") > - self.dut_testpmd.execute_cmd('set fwd rxonly') > - self.dut_testpmd.execute_cmd('set verbose 1') > - self.dut_testpmd.execute_cmd("start") > - time.sleep(10) > - self.vm0_dut.send_expect("rmmod %svf" % self.kdriver, "#") > - self.vm1_dut.send_expect("rmmod %svf" % self.kdriver, "#") > - self.vm0_dut.send_expect("modprobe %svf" % self.kdriver, "#") > - self.vm1_dut.send_expect("modprobe %svf" % self.kdriver, "#") > - > def check_pf_vf_link_status(self, session, intf): > """ > sometimes pf/vf will up abnormal, retry 5 times > @@ -511,9 +479,7 @@ class TestVfKernel(TestCase): > if "Network is down" in out: > print GREEN(out) > print GREEN("Try again") > - self.dut_testpmd.quit() > self.vm0_dut.restore_interfaces_linux() > - self.start_pf_vf() > else: > out =3D session.send_expect("ethtool %s" % intf, "#") > if "Link detected: yes" in out: > @@ -553,17 +519,11 @@ class TestVfKernel(TestCase): > vm0_vf0_mac, pkt_lens=3D2000)= =3D=3D > False, "kernel VF receive error packet") >=20 > # Change DPDK PF mtu as 3000,check no confusion/crash on kernel > VF > - if self.nic.startswith('niantic'): > - self.dut_testpmd.quit() > - self.dut_testpmd.start_testpmd( > - "Default", "--rxq=3D4 --txq=3D4 --port-topology=3Dchaine= d -- > max-pkt-len=3D3000") > - elif self.nic.startswith('fortville'): > - self.dut_testpmd.execute_cmd('stop') > - self.dut_testpmd.execute_cmd('port stop all') > - self.dut_testpmd.execute_cmd('port config mtu 0 3000') > - self.dut_testpmd.execute_cmd('port start all') > - > self.dut_testpmd.execute_cmd('stop') > + self.dut_testpmd.execute_cmd('port stop all') > + self.dut_testpmd.execute_cmd('port config mtu 0 3000') > + self.dut_testpmd.execute_cmd('port start all') > + > self.dut_testpmd.execute_cmd('set promisc all off') > self.dut_testpmd.execute_cmd('set fwd rxonly') > self.dut_testpmd.execute_cmd('set verbose 1') > @@ -593,15 +553,10 @@ class TestVfKernel(TestCase): > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf0, > vm0_vf0_mac, pkt_lens=3D2000)= , > "VF can't receive packet") >=20 > - if self.nic.startswith('niantic'): > - self.dut_testpmd.quit() > - self.dut_testpmd.start_testpmd( > - "Default", "--rxq=3D4 --txq=3D4 --port-topology=3Dchaine= d") > - elif self.nic.startswith('fortville'): > - self.dut_testpmd.execute_cmd('stop') > - self.dut_testpmd.execute_cmd('port stop all') > - self.dut_testpmd.execute_cmd('port config mtu 0 1500') > - self.dut_testpmd.execute_cmd('port start all') > + self.dut_testpmd.execute_cmd('stop') > + self.dut_testpmd.execute_cmd('port stop all') > + self.dut_testpmd.execute_cmd('port config mtu 0 1500') > + self.dut_testpmd.execute_cmd('port start all') >=20 > self.dut_testpmd.execute_cmd('start') >=20 > @@ -767,6 +722,7 @@ class TestVfKernel(TestCase): >=20 > if date_now >=3D date_new: > break > + time.sleep(3) >=20 > def send_packets(self): > self.tester.scapy_foreground() > @@ -1088,7 +1044,6 @@ class TestVfKernel(TestCase): > self.vm0_dut.close_session(vm0_vf2_newvmsession) > if getattr(self, 'vm0_vf3_newvmsession', None): > self.vm0_dut.close_session(vm0_vf3_newvmsession) > - self.dut_testpmd.quit() >=20 > # Sometime test failed ,we still need clear ip. > self.vm0_dut.send_expect( > @@ -1097,12 +1052,14 @@ class TestVfKernel(TestCase): > "ifconfig %s 0.0.0.0" % self.vm0_intf1, "#") > self.tester.send_expect("ifconfig %s 0.0.0.0" % > self.tester_intf, "#") > + time.sleep(5) >=20 >=20 > def tear_down_all(self): > """ > Run after each test suite. > """ > + self.dut_testpmd.quit() > self.destroy_vm_env() > self.dut.kill_all() > time.sleep(2) > -- > 2.5.5