From: Paolo Bonzini <pbonzini@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, mst@redhat.com,
rusty@rustcorp.com.au, qemu-devel@nongnu.org,
quintela@redhat.com
Subject: Re: [Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start
Date: Wed, 28 Mar 2012 09:22:32 +0200 [thread overview]
Message-ID: <4F72BC38.1030805@redhat.com> (raw)
In-Reply-To: <20120328054012.34135.77090.stgit@amd-6168-8-1.englab.nay.redhat.com>
Il 28/03/2012 07:40, Jason Wang ha scritto:
> qemu_announce_self() were moved to vm_start(). This is because we may
> want to let guest to send the gratuitous packets. A global variable
> need_announce were introduced to record the pending announcement, and
> vm_start() would send gratuitous packet depends on this value.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> migration.c | 2 +-
> migration.h | 2 ++
> vl.c | 5 +++++
> 3 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 00fa1e3..861cce9 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -88,7 +88,7 @@ void process_incoming_migration(QEMUFile *f)
> fprintf(stderr, "load of migration failed\n");
> exit(0);
> }
> - qemu_announce_self();
> + need_announce = true;
> DPRINTF("successfully loaded vm state\n");
>
> /* Make sure all file formats flush their mutable metadata */
> diff --git a/migration.h b/migration.h
> index 372b066..0a31463 100644
> --- a/migration.h
> +++ b/migration.h
> @@ -95,4 +95,6 @@ void migrate_add_blocker(Error *reason);
> */
> void migrate_del_blocker(Error *reason);
>
> +extern bool need_announce;
> +
> #endif
> diff --git a/vl.c b/vl.c
> index 65f11f2..05ebf57 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -231,6 +231,7 @@ int boot_menu;
> uint8_t *boot_splash_filedata;
> int boot_splash_filedata_size;
> uint8_t qemu_extra_params_fw[2];
> +bool need_announce = false;
>
> typedef struct FWBootEntry FWBootEntry;
>
> @@ -1266,6 +1267,10 @@ void vm_start(void)
> vm_state_notify(1, RUN_STATE_RUNNING);
> resume_all_vcpus();
> monitor_protocol_event(QEVENT_RESUME, NULL);
> + if (need_announce) {
> + need_announce = false;
> + qemu_announce_self();
> + }
> }
> }
>
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2012-03-28 7:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 5:40 [Qemu-devel] [V6 PATCH 0/4] Send gratuitous packets by guest Jason Wang
2012-03-28 5:40 ` [Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start Jason Wang
2012-03-28 7:22 ` Paolo Bonzini [this message]
2012-05-02 7:49 ` Orit Wasserman
2012-05-02 7:59 ` Jason Wang
2012-05-02 8:32 ` Paolo Bonzini
2012-03-28 5:40 ` [Qemu-devel] [V6 PATCH 2/4] net: model specific announcing support Jason Wang
2012-03-28 7:23 ` Paolo Bonzini
2012-03-28 5:40 ` [Qemu-devel] [V6 PATCH 3/4] virtio-net: notify guest to annouce itself Jason Wang
2012-03-28 5:40 ` [Qemu-devel] [V6 PATCH 4/4] virtio-net: compat guest announce support Jason Wang
2012-05-02 3:51 ` [Qemu-devel] [V6 PATCH 0/4] Send gratuitous packets by guest 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=4F72BC38.1030805@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@linux.vnet.ibm.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).