test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability
@ 2016-12-16  7:54 Yao Lei
  2016-12-19  2:59 ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Yao Lei @ 2016-12-16  7:54 UTC (permalink / raw)
  To: dts; +Cc: lei yao

From: lei yao <lei.a.yao@intel.com>

Signed-off-by: lei yao <lei.a.yao@intel.com>
---
 framework/qemu_kvm.py | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index 6ced54a..e9d29cc 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -606,21 +606,31 @@ class QEMUKvm(VirtBase):
         if 'opt_path' in options.keys() and options['opt_path']:
             dev_boot_line = '-chardev socket'
             char_id = 'char%d' % self.char_idx
-            dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' % options['opt_path']
-            self.char_idx += 1
-            self.__add_boot_line(dev_boot_line)
+            if 'opt_server' in options.keys() and options['opt_server']:
+                dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' %options['opt_path'] + separator + '%s' % options['opt_server']
+		self.char_idx += 1
+                self.__add_boot_line(dev_boot_line)
+            else:
+                dev_boot_line += separator + 'id=%s' % char_id + separator + 'path=%s' %options['opt_path']
+                self.char_idx += 1
+                self.__add_boot_line(dev_boot_line)
             # netdev parameter
             netdev_id = 'netdev%d' % self.netdev_idx
             self.netdev_idx += 1
-            dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
+            if 'opt_queue' in options.keys() and options['opt_queue']:
+                queue_num=options['opt_queue']
+                dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce,queues=%s' % (netdev_id, char_id,queue_num)
+            else:
+                dev_boot_line = '-netdev type=vhost-user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
             self.__add_boot_line(dev_boot_line)
             # device parameter
             opts = {'opt_netdev': '%s' % netdev_id}
             if 'opt_mac' in options.keys() and \
                     options['opt_mac']:
                 opts['opt_mac'] = options['opt_mac']
-
-            self.__add_vm_virtio_net_pci(**opts)
+            if 'opt_settings' in options.keys() and options['opt_settings']:
+                opts['opt_settings'] = options['opt_settings']
+	self.__add_vm_virtio_net_pci(**opts)
 
     def __add_vm_virtio_cuse_pci(self, **options):
         """
@@ -939,7 +949,7 @@ class QEMUKvm(VirtBase):
         wait for 120 seconds for vm net ready
         10.0.2.* is the default ip address allocated by qemu
         """
-        count = 20
+        count = 40
         while count:
             out = self.__control_session('ifconfig')
             if "10.0.2" in out:
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability
  2016-12-16  7:54 [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability Yao Lei
@ 2016-12-19  2:59 ` Liu, Yong
  2016-12-19  3:19   ` Yao, Lei A
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2016-12-19  2:59 UTC (permalink / raw)
  To: Yao, Lei A, dts; +Cc: Yao, Lei A

Hi Lei,
Both "server" and "multi_queue" are new parameters for qemu hypervisor library. 
You'd better add some reference in configuration file like sriov_kvm.cfg. 

Please also give some basic descriptions for these two parameters in commit log.

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yao Lei
> Sent: Friday, December 16, 2016 3:55 PM
> To: dts@dpdk.org
> Cc: Yao, Lei A
> Subject: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> "multi_queue" parameter for more qemu launch option and adjust some
> timeout setting to improve the test stability
> 
> From: lei yao <lei.a.yao@intel.com>
> 
> Signed-off-by: lei yao <lei.a.yao@intel.com>
> ---
>  framework/qemu_kvm.py | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
> index 6ced54a..e9d29cc 100644
> --- a/framework/qemu_kvm.py
> +++ b/framework/qemu_kvm.py
> @@ -606,21 +606,31 @@ class QEMUKvm(VirtBase):
>          if 'opt_path' in options.keys() and options['opt_path']:
>              dev_boot_line = '-chardev socket'
>              char_id = 'char%d' % self.char_idx
> -            dev_boot_line += separator + 'id=%s' % char_id + separator +
> 'path=%s' % options['opt_path']
> -            self.char_idx += 1
> -            self.__add_boot_line(dev_boot_line)
> +            if 'opt_server' in options.keys() and options['opt_server']:
> +                dev_boot_line += separator + 'id=%s' % char_id +
> separator + 'path=%s' %options['opt_path'] + separator + '%s' %
> options['opt_server']
> +		self.char_idx += 1
> +                self.__add_boot_line(dev_boot_line)
> +            else:
> +                dev_boot_line += separator + 'id=%s' % char_id +
> separator + 'path=%s' %options['opt_path']
> +                self.char_idx += 1
> +                self.__add_boot_line(dev_boot_line)
>              # netdev parameter
>              netdev_id = 'netdev%d' % self.netdev_idx
>              self.netdev_idx += 1
> -            dev_boot_line = '-netdev type=vhost-
> user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
> +            if 'opt_queue' in options.keys() and options['opt_queue']:
> +                queue_num=options['opt_queue']
> +                dev_boot_line = '-netdev type=vhost-
> user,id=%s,chardev=%s,vhostforce,queues=%s' % (netdev_id,
> char_id,queue_num)
> +            else:
> +                dev_boot_line = '-netdev type=vhost-
> user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
>              self.__add_boot_line(dev_boot_line)
>              # device parameter
>              opts = {'opt_netdev': '%s' % netdev_id}
>              if 'opt_mac' in options.keys() and \
>                      options['opt_mac']:
>                  opts['opt_mac'] = options['opt_mac']
> -
> -            self.__add_vm_virtio_net_pci(**opts)
> +            if 'opt_settings' in options.keys() and
> options['opt_settings']:
> +                opts['opt_settings'] = options['opt_settings']
> +	self.__add_vm_virtio_net_pci(**opts)
> 
>      def __add_vm_virtio_cuse_pci(self, **options):
>          """
> @@ -939,7 +949,7 @@ class QEMUKvm(VirtBase):
>          wait for 120 seconds for vm net ready
>          10.0.2.* is the default ip address allocated by qemu
>          """
> -        count = 20
> +        count = 40
>          while count:
>              out = self.__control_session('ifconfig')
>              if "10.0.2" in out:
> --
> 2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability
  2016-12-19  2:59 ` Liu, Yong
@ 2016-12-19  3:19   ` Yao, Lei A
  2016-12-19  3:33     ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Yao, Lei A @ 2016-12-19  3:19 UTC (permalink / raw)
  To: Liu, Yong, dts

Hi, Yong

Only part test cases will use this parameter, so I don't want add it to the .cfg file but keep them in the tests file. Then I can use common .cfg file to different vhost/virtio test cases. 
For the comment, I can add most info in the commit log in the V2 patch. Thanks

BRs
Lei

> -----Original Message-----
> From: Liu, Yong
> Sent: Monday, December 19, 2016 11:00 AM
> To: Yao, Lei A <lei.a.yao@intel.com>; dts@dpdk.org
> Cc: Yao, Lei A <lei.a.yao@intel.com>
> Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> "multi_queue" parameter for more qemu launch option and adjust some
> timeout setting to improve the test stability
> 
> Hi Lei,
> Both "server" and "multi_queue" are new parameters for qemu hypervisor
> library.
> You'd better add some reference in configuration file like sriov_kvm.cfg.
> 
> Please also give some basic descriptions for these two parameters in commit
> log.
> 
> Thanks,
> Marvin
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yao Lei
> > Sent: Friday, December 16, 2016 3:55 PM
> > To: dts@dpdk.org
> > Cc: Yao, Lei A
> > Subject: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> > "multi_queue" parameter for more qemu launch option and adjust some
> > timeout setting to improve the test stability
> >
> > From: lei yao <lei.a.yao@intel.com>
> >
> > Signed-off-by: lei yao <lei.a.yao@intel.com>
> > ---
> >  framework/qemu_kvm.py | 24 +++++++++++++++++-------
> >  1 file changed, 17 insertions(+), 7 deletions(-)
> >
> > diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
> > index 6ced54a..e9d29cc 100644
> > --- a/framework/qemu_kvm.py
> > +++ b/framework/qemu_kvm.py
> > @@ -606,21 +606,31 @@ class QEMUKvm(VirtBase):
> >          if 'opt_path' in options.keys() and options['opt_path']:
> >              dev_boot_line = '-chardev socket'
> >              char_id = 'char%d' % self.char_idx
> > -            dev_boot_line += separator + 'id=%s' % char_id + separator +
> > 'path=%s' % options['opt_path']
> > -            self.char_idx += 1
> > -            self.__add_boot_line(dev_boot_line)
> > +            if 'opt_server' in options.keys() and options['opt_server']:
> > +                dev_boot_line += separator + 'id=%s' % char_id +
> > separator + 'path=%s' %options['opt_path'] + separator + '%s' %
> > options['opt_server']
> > +		self.char_idx += 1
> > +                self.__add_boot_line(dev_boot_line)
> > +            else:
> > +                dev_boot_line += separator + 'id=%s' % char_id +
> > separator + 'path=%s' %options['opt_path']
> > +                self.char_idx += 1
> > +                self.__add_boot_line(dev_boot_line)
> >              # netdev parameter
> >              netdev_id = 'netdev%d' % self.netdev_idx
> >              self.netdev_idx += 1
> > -            dev_boot_line = '-netdev type=vhost-
> > user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
> > +            if 'opt_queue' in options.keys() and options['opt_queue']:
> > +                queue_num=options['opt_queue']
> > +                dev_boot_line = '-netdev type=vhost-
> > user,id=%s,chardev=%s,vhostforce,queues=%s' % (netdev_id,
> > char_id,queue_num)
> > +            else:
> > +                dev_boot_line = '-netdev type=vhost-
> > user,id=%s,chardev=%s,vhostforce' % (netdev_id, char_id)
> >              self.__add_boot_line(dev_boot_line)
> >              # device parameter
> >              opts = {'opt_netdev': '%s' % netdev_id}
> >              if 'opt_mac' in options.keys() and \
> >                      options['opt_mac']:
> >                  opts['opt_mac'] = options['opt_mac']
> > -
> > -            self.__add_vm_virtio_net_pci(**opts)
> > +            if 'opt_settings' in options.keys() and
> > options['opt_settings']:
> > +                opts['opt_settings'] = options['opt_settings']
> > +	self.__add_vm_virtio_net_pci(**opts)
> >
> >      def __add_vm_virtio_cuse_pci(self, **options):
> >          """
> > @@ -939,7 +949,7 @@ class QEMUKvm(VirtBase):
> >          wait for 120 seconds for vm net ready
> >          10.0.2.* is the default ip address allocated by qemu
> >          """
> > -        count = 20
> > +        count = 40
> >          while count:
> >              out = self.__control_session('ifconfig')
> >              if "10.0.2" in out:
> > --
> > 2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability
  2016-12-19  3:19   ` Yao, Lei A
@ 2016-12-19  3:33     ` Liu, Yong
  2016-12-19  4:46       ` Yao, Lei A
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2016-12-19  3:33 UTC (permalink / raw)
  To: Yao, Lei A, dts

Lei, I known only few cases use these parameters. What I mean is that to add some comments for these parameters.
There's one document doc/dts_gsg/virtualization.rst which is the reference for qemu configure parameters.
But modified this doc need more effort, so which I recommend is that just add the comments in one configuration file which contain all parameters.
It can help other users for understand how to use these parameters.

Thanks,
Marvin

> -----Original Message-----
> From: Yao, Lei A
> Sent: Monday, December 19, 2016 11:20 AM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> "multi_queue" parameter for more qemu launch option and adjust some
> timeout setting to improve the test stability
> 
> Hi, Yong
> 
> Only part test cases will use this parameter, so I don't want add it to
> the .cfg file but keep them in the tests file. Then I can use common .cfg
> file to different vhost/virtio test cases.
> For the comment, I can add most info in the commit log in the V2 patch.
> Thanks
> 
> BRs
> Lei
> 
> > -----Original Message-----
> > From: Liu, Yong
> > Sent: Monday, December 19, 2016 11:00 AM
> > To: Yao, Lei A <lei.a.yao@intel.com>; dts@dpdk.org
> > Cc: Yao, Lei A <lei.a.yao@intel.com>
> > Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> > "multi_queue" parameter for more qemu launch option and adjust some
> > timeout setting to improve the test stability
> >
> > Hi Lei,
> > Both "server" and "multi_queue" are new parameters for qemu hypervisor
> > library.
> > You'd better add some reference in configuration file like sriov_kvm.cfg.
> >
> > Please also give some basic descriptions for these two parameters in
> commit
> > log.
> >
> > Thanks,
> > Marvin
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability
  2016-12-19  3:33     ` Liu, Yong
@ 2016-12-19  4:46       ` Yao, Lei A
  0 siblings, 0 replies; 5+ messages in thread
From: Yao, Lei A @ 2016-12-19  4:46 UTC (permalink / raw)
  To: Liu, Yong, dts

Understand. I will add more introduction into the vhost_sample.cfg in the V2 patch. Thanks.

BRs
Lei

> -----Original Message-----
> From: Liu, Yong
> Sent: Monday, December 19, 2016 11:33 AM
> To: Yao, Lei A <lei.a.yao@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> "multi_queue" parameter for more qemu launch option and adjust some
> timeout setting to improve the test stability
> 
> Lei, I known only few cases use these parameters. What I mean is that to add
> some comments for these parameters.
> There's one document doc/dts_gsg/virtualization.rst which is the reference
> for qemu configure parameters.
> But modified this doc need more effort, so which I recommend is that just
> add the comments in one configuration file which contain all parameters.
> It can help other users for understand how to use these parameters.
> 
> Thanks,
> Marvin
> 
> > -----Original Message-----
> > From: Yao, Lei A
> > Sent: Monday, December 19, 2016 11:20 AM
> > To: Liu, Yong; dts@dpdk.org
> > Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and
> > "multi_queue" parameter for more qemu launch option and adjust some
> > timeout setting to improve the test stability
> >
> > Hi, Yong
> >
> > Only part test cases will use this parameter, so I don't want add it to
> > the .cfg file but keep them in the tests file. Then I can use common .cfg
> > file to different vhost/virtio test cases.
> > For the comment, I can add most info in the commit log in the V2 patch.
> > Thanks
> >
> > BRs
> > Lei
> >
> > > -----Original Message-----
> > > From: Liu, Yong
> > > Sent: Monday, December 19, 2016 11:00 AM
> > > To: Yao, Lei A <lei.a.yao@intel.com>; dts@dpdk.org
> > > Cc: Yao, Lei A <lei.a.yao@intel.com>
> > > Subject: RE: [dts] [PATCH V1] framework qemu_kvm.py: Add "server"
> and
> > > "multi_queue" parameter for more qemu launch option and adjust some
> > > timeout setting to improve the test stability
> > >
> > > Hi Lei,
> > > Both "server" and "multi_queue" are new parameters for qemu
> hypervisor
> > > library.
> > > You'd better add some reference in configuration file like sriov_kvm.cfg.
> > >
> > > Please also give some basic descriptions for these two parameters in
> > commit
> > > log.
> > >
> > > Thanks,
> > > Marvin
> > >

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-19  4:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16  7:54 [dts] [PATCH V1] framework qemu_kvm.py: Add "server" and "multi_queue" parameter for more qemu launch option and adjust some timeout setting to improve the test stability Yao Lei
2016-12-19  2:59 ` Liu, Yong
2016-12-19  3:19   ` Yao, Lei A
2016-12-19  3:33     ` Liu, Yong
2016-12-19  4:46       ` Yao, Lei A

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).