test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Xie, BeibeiX" <beibeix.xie@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Xu, Qian Q" <qian.q.xu@intel.com>
Subject: Re: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08
Date: Fri, 1 Sep 2017 05:24:38 +0000	[thread overview]
Message-ID: <0BC287C5722AD447A342E36F5521A2E51516E3@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62E98244@SHSMSX103.ccr.corp.intel.com>

Thanks,yong. I will update it at next version

-----Original Message-----
From: Liu, Yong 
Sent: Friday, September 1, 2017 1:02 PM
To: Xie, BeibeiX; dts@dpdk.org
Cc: Xu, Qian Q
Subject: RE: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08

Beibei, please add this information is your commit log and send the patch again.

> -----Original Message-----
> From: Xie, BeibeiX
> Sent: Friday, September 01, 2017 11:19 AM
> To: Liu, Yong <yong.liu@intel.com>; dts@dpdk.org
> Cc: Xu, Qian Q <qian.q.xu@intel.com>
> Subject: RE: [dts] [PATCH V2] tests/vf_kernel:adjust to dpdk17.08
> 
> Hi,yong
> Modify the vf_kernel script is based on
> https://jira01.devtools.intel.com/browse/DPDK-2849
> 
> Best regards,
> Beibei
> 
> -----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
> 
> Beibei,
> Could you please give the bug id for this issue? We should not modify 
> overall 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 <beibeix.xie@intel.com>
> > 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 <beibeix.xie@intel.com>
> > ---
> >  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='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)
> >
> >          vf0_prop_1 = {'opt_host': self.sriov_vfs_port[0].pci}
> >          vf0_prop_2 = {'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 = 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 = 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 = 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 = 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_intf0,
> >                                             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 = 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, 
> > + "#")
> >
> >      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 = vlan_ids % 4095 + 1
> > +
> >          self.verify(self.verify_vm_tcpdump(self.vm0_dut,
> > self.vm0_intf0, vm0_vf0_mac,
> >                                             vlan_id='%d' % 
> > wrong_vlan) == False, "received wrong vlan packet")
> >
> > @@ -462,7 +445,7 @@ class TestVfKernel(TestCase):
> >          """
> >          verify packet statistic
> >          """
> > -
> > +        time.sleep(10)
> >          out = self.vm0_dut.send_expect("ethtool -S %s" % 
> > self.vm0_intf0,
> > "#")
> >          rx_packets_before = re.findall("\s*rx.*packets:\s*(\d*)", out)
> >          nb_rx_pkts_before = 0
> > @@ -482,21 +465,6 @@ class TestVfKernel(TestCase):
> >          self.verify(nb_rx_pkts_after == 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=4 --txq=4 --port-topology=chained")
> > -        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 = session.send_expect("ethtool %s" % intf, "#")
> >                  if "Link detected: yes" in out:
> > @@ -553,17 +519,11 @@ class TestVfKernel(TestCase):
> >                                             vm0_vf0_mac,
> > pkt_lens=2000) == 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=4 --txq=4 --port-topology=chained --
> > max-pkt-len=3000")
> > -        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=2000), "VF can't receive packet")
> >
> > -        if self.nic.startswith('niantic'):
> > -            self.dut_testpmd.quit()
> > -            self.dut_testpmd.start_testpmd(
> > -                "Default", "--rxq=4 --txq=4 --port-topology=chained")
> > -        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 >= 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

      reply	other threads:[~2017-09-01  5:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31  9:59 xie,beibei
2017-09-01  1:44 ` Liu, Yong
2017-09-01  3:18   ` Xie, BeibeiX
2017-09-01  5:02     ` Liu, Yong
2017-09-01  5:24       ` Xie, BeibeiX [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0BC287C5722AD447A342E36F5521A2E51516E3@SHSMSX101.ccr.corp.intel.com \
    --to=beibeix.xie@intel.com \
    --cc=dts@dpdk.org \
    --cc=qian.q.xu@intel.com \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).