From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 46DBD2E8F for ; Fri, 1 Sep 2017 07:02:06 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 31 Aug 2017 22:02:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,456,1498546800"; d="scan'208";a="146341893" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2017 22:02:05 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 Aug 2017 22:02:05 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 Aug 2017 22:02:05 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Fri, 1 Sep 2017 13:02:03 +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//+UxQCAAKK/UA== Date: Fri, 1 Sep 2017 05:02:02 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E98244@SHSMSX103.ccr.corp.intel.com> References: <1504173577-106063-1-git-send-email-beibeix.xie@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E97E71@SHSMSX103.ccr.corp.intel.com> <0BC287C5722AD447A342E36F5521A2E51516BE@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <0BC287C5722AD447A342E36F5521A2E51516BE@SHSMSX101.ccr.corp.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 05:02:08 -0000 Beibei, please add this information is your commit log and send the patch a= gain. > -----Original Message----- > From: Xie, BeibeiX > Sent: Friday, September 01, 2017 11:19 AM > To: Liu, Yong ; dts@dpdk.org > Cc: Xu, Qian Q > Subject: RE: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08 >=20 > Hi,yong > Modify the vf_kernel script is based on > https://jira01.devtools.intel.com/browse/DPDK-2849 >=20 > Best regards, > Beibei >=20 > -----Original Message----- > From: Liu, Yong > Sent: Friday, September 1, 2017 9:44 AM > To: Xie, BeibeiX; dts@dpdk.org > Cc: Xu, Qian Q > Subject: RE: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08 >=20 > Beibei, > Could you please give the bug id for this issue? We should not modify > overall test plan without any approval. >=20 > Thanks, > Marvin >=20 > > -----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 > > > > 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. > > > > > > Signed-off-by: xie,beibei > > --- > > tests/TestSuite_vf_kernel.py | 79 > > ++++++++++----------------------------- > > ----- > > 1 file changed, 18 insertions(+), 61 deletions(-) > > > > 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 > > > > 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 b= e > > # received by VF > > self.dut_testpmd.execute_cmd("start") > > + time.sleep(5) > > > > 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) > > > > - 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_intf0, > > "#") > > self.verify("Link detected: yes" in out, "Wrong link > > status") > > + time.sleep(3) > > > > # 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_intf0, > > "#") > > 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_intf0, > > "#") > > - 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_intf0, > > "#") > > - 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) > > > > 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() > > > > def test_reset(self): > > """ > > @@ -320,8 +302,6 @@ class TestVfKernel(TestCase): > > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf= 0, > > vm0_vf0_mac), "Unload VF1 > > kernel driver impact VF0") > > > > - 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") > > > > @@ -343,6 +323,7 @@ class TestVfKernel(TestCase): > > vm0_vf0_mac =3D self.vm0_dut.ports_info[0]['port'].get_mac_add= r() > > self.verify(self.verify_vm_tcpdump(self.vm0_dut, self.vm0_intf= 0, > > vm0_vf0_mac), "Reset VF1 > > kernel driver impact VF0") > > + self.vm1_dut.send_expect("modprobe %svf" % self.kdriver, "#") > > > > 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") > > > > @@ -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_intf0, > > "#") > > rx_packets_before =3D re.findall("\s*rx.*packets:\s*(\d*)", ou= t) > > 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") > > > > - 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") > > > > # 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=3Dchai= ned -- > > 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_intf= 0, > > vm0_vf0_mac, > > pkt_lens=3D2000), "VF can't receive packet") > > > > - if self.nic.startswith('niantic'): > > - self.dut_testpmd.quit() > > - self.dut_testpmd.start_testpmd( > > - "Default", "--rxq=3D4 --txq=3D4 --port-topology=3Dchai= ned") > > - 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') > > > > self.dut_testpmd.execute_cmd('start') > > > > @@ -767,6 +722,7 @@ class TestVfKernel(TestCase): > > > > if date_now >=3D date_new: > > break > > + time.sleep(3) > > > > 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() > > > > # 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) > > > > > > 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