[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp comma
From: |
Vladislav Yasevich |
Subject: |
[Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command |
Date: |
Wed, 24 May 2017 14:05:22 -0400 |
Add a qmp command that can trigger guest announcements.
Based on work of Germano Veit Michel <address@hidden>
Signed-off-by: Vladislav Yasevich <address@hidden>
---
migration/savevm.c | 14 ++++++++++++++
qapi-schema.json | 19 +++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index a4097c9..b55ce6a 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -265,6 +265,20 @@ void qemu_announce_self(AnnounceParameters *params)
qemu_announce_self_once(timer);
}
+void qmp_announce_self(bool has_params, AnnounceParameters *params,
+ Error **errp)
+{
+ AnnounceParameters announce_params;
+
+ memcpy(&announce_params, qemu_get_announce_params(),
+ sizeof(announce_params));
+
+ if (has_params)
+ qemu_set_announce_parameters(&announce_params, params);
+
+ qemu_announce_self(&announce_params);
+}
+
/***********************************************************/
/* savevm/loadvm support */
diff --git a/qapi-schema.json b/qapi-schema.json
index 2030087..126b09d 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -654,6 +654,25 @@
'returns': 'AnnounceParameters' }
##
+# @announce-self:
+#
+# Trigger generation of broadcast RARP frames to update network switches.
+# This can be useful when network bonds fail-over the active slave.
+#
+# Arguments: None.
+#
+# Example:
+#
+# -> { "execute": "announce-self"
+# "arguments": { "announce-rounds": 5 } }
+# <- { "return": {} }
+#
+# Since: 2.10
+##
+{ 'command': 'announce-self',
+ 'data' : {'*params': 'AnnounceParameters'} }
+
+##
# @MigrationStats:
#
# Detailed migration status.
--
2.7.4
- Re: [Qemu-devel] [PATCH 02/12] migration: Introduce announcement timer, (continued)