test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Wang, Yinan" <yinan.wang@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V2 2/3][migration] framework: update code for migration
Date: Thu, 17 Oct 2019 01:57:00 +0000	[thread overview]
Message-ID: <E0CBA5A1980F1F408E1F28F9991B5B1D50F22260@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1571081822-5323-2-git-send-email-lihongx.ma@intel.com>

Acked-by: Wang, Yinan <yinan.wang@intel.com>

> -----Original Message-----
> From: Ma, LihongX
> Sent: 2019年10月15日 3:37
> To: dts@dpdk.org
> Cc: Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts][PATCH V2 2/3][migration] framework: update code for migration
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  framework/virt_base.py |  8 ++++++++
>  framework/virt_dut.py  | 12 ++++++++----
>  2 files changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/framework/virt_base.py b/framework/virt_base.py index
> 7c1e1de..6e3462c 100644
> --- a/framework/virt_base.py
> +++ b/framework/virt_base.py
> @@ -65,6 +65,8 @@ class VirtBase(object):
>          self.host_dut = dut
>          self.vm_name = vm_name
>          self.suite = suite_name
> +        # indicate whether the current vm is migration vm
> +        self.migration_vm = False
> 
>          # create self used host session, need close it later
>          self.host_session = self.host_dut.new_session(self.vm_name)
> @@ -330,6 +332,8 @@ class VirtBase(object):
>          """
>          try:
>              if self.vm_status is ST_PAUSE:
> +                # flag current vm is migration vm
> +                self.migration_vm = True
>                  # connect backup vm dut and it just inherited from host
>                  vm_dut = self.instantiate_vm_dut(set_target, cpu_topo,
> bind_dev=False, autodetect_topo=False)
>          except Exception as vm_except:
> @@ -419,9 +423,13 @@ class VirtBase(object):
>          vm_dut.host_dut = self.host_dut
>          vm_dut.host_session = self.host_session
>          vm_dut.init_log()
> +        vm_dut.migration_vm = self.migration_vm
> 
>          read_cache = False
>          skip_setup = self.host_dut.skip_setup
> +        # if current vm is migration vm, skip compile dpdk
> +        if self.migration_vm:
> +	        skip_setup = True
>          base_dir = self.host_dut.base_dir
>          vm_dut.set_speedup_options(read_cache, skip_setup)
> 
> diff --git a/framework/virt_dut.py b/framework/virt_dut.py index
> 599ddca..a916b72 100644
> --- a/framework/virt_dut.py
> +++ b/framework/virt_dut.py
> @@ -58,6 +58,7 @@ class VirtDut(DPDKdut):
>          self.hyper = hyper
>          self.cpu_topo = cpu_topo
>          self.dut_id = dut_id
> +        self.migration_vm = False
> 
>          self.vm_ip = crb['IP']
>          self.NAME = 'virtdut' + LOG_NAME_SEP + '%s' % self.vm_ip @@
> -188,10 +189,13 @@ class VirtDut(DPDKdut):
>          self.update_ports()
> 
>          # restore dut ports to kernel
> -        if self.virttype != 'XEN':
> -            self.restore_interfaces()
> -        else:
> -            self.restore_interfaces_domu()
> +        # if current vm is migration vm, skip restore dut ports
> +        # because there maybe have some app have run
> +        if not self.migration_vm:
> +            if self.virttype != 'XEN':
> +                self.restore_interfaces()
> +            else:
> +                self.restore_interfaces_domu()
>          # rescan ports after interface up
>          self.rescan_ports()
> 
> --
> 2.7.4


  reply	other threads:[~2019-10-17  1:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 19:37 [dts] [PATCH V2 1/3][migration] conf/vhost_user_live_migration: update cfg file lihong
2019-10-14 19:37 ` [dts] [PATCH V2 2/3][migration] framework: update code for migration lihong
2019-10-17  1:57   ` Wang, Yinan [this message]
2019-11-13  1:06   ` Wang, Yinan
2019-10-14 19:37 ` [dts] [PATCH V2 3/3][migration] tests/vhost_user_live_migration: update code lihong
2019-10-17  1:56   ` Wang, Yinan
2019-11-13  1:05   ` Wang, Yinan
2019-10-17  1:57 ` [dts] [PATCH V2 1/3][migration] conf/vhost_user_live_migration: update cfg file Wang, Yinan
2019-10-21  2:34 ` Tu, Lijuan
2019-11-13  1:06 ` Wang, Yinan

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=E0CBA5A1980F1F408E1F28F9991B5B1D50F22260@SHSMSX104.ccr.corp.intel.com \
    --to=yinan.wang@intel.com \
    --cc=dts@dpdk.org \
    --cc=lihongx.ma@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).