From patchwork Sat Oct 22 05:38:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 121146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1E7FA1007D3 for ; Sat, 22 Oct 2011 16:39:03 +1100 (EST) Received: from localhost ([::1]:43266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHUIL-0002ES-OX for incoming@patchwork.ozlabs.org; Sat, 22 Oct 2011 01:38:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHUI9-00024M-3v for qemu-devel@nongnu.org; Sat, 22 Oct 2011 01:38:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHUI7-0000Od-Oa for qemu-devel@nongnu.org; Sat, 22 Oct 2011 01:38:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHUI7-0000OV-FW for qemu-devel@nongnu.org; Sat, 22 Oct 2011 01:38:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9M5cf3r012859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 22 Oct 2011 01:38:42 -0400 Received: from dhcp-8-146.nay.redhat.com (dhcp-8-146.nay.redhat.com [10.66.8.146]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9M5cb7M018296; Sat, 22 Oct 2011 01:38:38 -0400 To: aliguori@us.ibm.com, quintela@redhat.com, jan.kiszka@siemens.com, mst@redhat.com, qemu-devel@nongnu.org, blauwirbel@gmail.com From: Jason Wang Date: Sat, 22 Oct 2011 13:38:37 +0800 Message-ID: <20111022053837.21526.60734.stgit@dhcp-8-146.nay.redhat.com> In-Reply-To: <20111022053540.21526.61249.stgit@dhcp-8-146.nay.redhat.com> References: <20111022053540.21526.61249.stgit@dhcp-8-146.nay.redhat.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, rusty@rustcorp.com.au, kvm@vger.kernel.org, netdev@vger.kernel.org Subject: [Qemu-devel] [RFC v2 PATCH 1/4] announce self after vm start X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We send gratituous packets to let switch to update its mac address table, this is only done after migration currently because guest may move to the host with another port connect to switch. Unfortunately this kind of notification is also needed for continue a stopped vm as the mac address table entry may not existed because of aging. This patch solve this by call qemu_announce_self() in vm_start() instead of in process_incoming_migration(). Through this, gratituous packets were sent each time when vm starts. Signed-off-by: Jason Wang --- migration.c | 1 - vl.c | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 77a51ad..3326b02 100644 --- a/migration.c +++ b/migration.c @@ -67,7 +67,6 @@ void process_incoming_migration(QEMUFile *f) fprintf(stderr, "load of migration failed\n"); exit(0); } - qemu_announce_self(); DPRINTF("successfully loaded vm state\n"); if (autostart) { diff --git a/vl.c b/vl.c index dbf7778..e4408e0 100644 --- a/vl.c +++ b/vl.c @@ -1262,6 +1262,7 @@ void vm_start(void) vm_state_notify(1, RUN_STATE_RUNNING); resume_all_vcpus(); monitor_protocol_event(QEVENT_RESUME, NULL); + qemu_announce_self(); } }