qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "yangke (J)" <yangke27@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "wangxin \(U\)" <wangxinxin.wang@huawei.com>,
	"quintela@redhat.com" <quintela@redhat.com>
Subject: Re: [question]vhost-user: atuo fix network link broken during migration
Date: Tue, 24 Mar 2020 13:49:53 +0800	[thread overview]
Message-ID: <47abadbd-c559-1900-f3b1-3697f9e7c0b5@redhat.com> (raw)
In-Reply-To: <0CC1E03725E48D478F815032182740230A42A312@DGGEMM532-MBS.china.huawei.com>


On 2020/3/23 下午4:17, yangke (J) wrote:
> We find an issue when host mce trigger openvswitch(dpdk) restart in source host during guest migration,


Did you mean the vhost-user netev was deleted from the source host?


> VM is still link down in frontend after migration, it cause the network in VM never be up again.
>
> virtio_net_load_device:
>      /* nc.link_down can't be migrated, so infer link_down according
>       * to link status bit in n->status */
>      link_down = (n->status & VIRTIO_NET_S_LINK_UP) == 0;
>      for (i = 0; i < n->max_queues; i++) {
>          qemu_get_subqueue(n->nic, i)->link_down = link_down;
>      }
>
> guset:                    migrate begin -------> vCPU pause --------> vmsate load ------->migrate finish
>                                              ^                  ^                     ^
>                                              |                  |                     |
> openvswitch in source host:          begin to restart       restarting             started
>                                              ^                  ^                     ^
>                                              |                  |                     |
> nc in frontend in source:               link down           link down             link down
>                                              ^                  ^                     ^
>                                              |                  |                     |
> nc in frontend in destination:          link up             link up               link down
>                                              ^                  ^                     ^
>                                              |                  |                     |
> guset network:                            broken             broken                broken
>                                              ^                  ^                     ^
>                                              |                  |                     |
> nc in backend in source:                link down          link down              link up
>                                              ^                  ^                     ^
>                                              |                  |                     |
> nc in backend in destination:           link up             link up               link up
>
> The link_down of frontend was loaded from n->status, n->status is link down in source, so the link_down of
> frontend is true. The backend in destination host is link up, but the frontend in destination host is
> link down, it cause the network in gust never be up again until an guest cold reboot.
>
> Is there a way to auto fix the link status? or just abort the migration in virtio net device load?


Maybe we can try to sync link status after migration?

Thanks




  reply	other threads:[~2020-03-24  5:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  8:17 [question]vhost-user: atuo fix network link broken during migration yangke (J)
2020-03-24  5:49 ` Jason Wang [this message]
2020-03-24 11:08   ` 答复: " yangke (J)
2020-03-26  9:45     ` Jason Wang

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=47abadbd-c559-1900-f3b1-3697f9e7c0b5@redhat.com \
    --to=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=yangke27@huawei.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).