From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:51423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyzUM-0005eA-UL for qemu-devel@nongnu.org; Wed, 27 Feb 2019 08:43:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyzMX-0005X5-Ka for qemu-devel@nongnu.org; Wed, 27 Feb 2019 08:35:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyzMU-0005OJ-2d for qemu-devel@nongnu.org; Wed, 27 Feb 2019 08:35:04 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B062D309CC26 for ; Wed, 27 Feb 2019 12:56:58 +0000 (UTC) Date: Wed, 27 Feb 2019 12:56:55 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20190227125654.GE2602@work-vm> References: <20190226195959.28759-1-dgilbert@redhat.com> <20190226195959.28759-8-dgilbert@redhat.com> <87pnrdoh73.fsf@dusky.pond.sub.org> <20190227095931.GB2602@work-vm> <87h8cpxv9p.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h8cpxv9p.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v5 7/9] qmp: Add announce-self command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: jasowang@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com * Markus Armbruster (armbru@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (armbru@redhat.com) wrote: > >> "Dr. David Alan Gilbert (git)" writes: > >> > >> > From: "Dr. David Alan Gilbert" > >> > > >> > Add a qmp command that can trigger guest announcements. > >> > > >> > It uses its own announce-timer instance, and parameters > >> > passed to it explicitly in the command. > >> > > >> > Like most qmp commands, it's in the main thread/bql, so > >> > there's no racing with any outstanding timer. > >> > > >> > Based on work of Germano Veit Michel and > >> > Vladislav Yasevich > >> > > >> > Signed-off-by: Dr. David Alan Gilbert > >> > Reviewed-by: Michael S. Tsirkin > >> > --- > >> [...] > >> > diff --git a/qapi/net.json b/qapi/net.json > >> > index 5face0c14b..c093087278 100644 > >> > --- a/qapi/net.json > >> > +++ b/qapi/net.json > >> > @@ -707,3 +707,23 @@ > >> > 'max': 'int', > >> > 'rounds': 'int', > >> > 'step': 'int' } } > >> > + > >> > +## > >> > +# @announce-self: > >> > +# > >> > +# Trigger generation of broadcast RARP frames to update network switches. > >> > +# This can be useful when network bonds fail-over the active slave. > >> > +# > >> > +# @params: AnnounceParameters giving timing and repetition count of announce > >> > +# > >> > +# Example: > >> > +# > >> > +# -> { "execute": "announce-self" > >> > +# "arguments": { "params:" { > >> > +# "initial": 50, "max": 550, "rounds": 10, "step": 50 } } } > >> > +# <- { "return": {} } > >> > +# > >> > +# Since: 4.0 > >> > +## > >> > +{ 'command': 'announce-self', > >> > + 'data' : {'params': 'AnnounceParameters'} } > >> > >> Any particular reason for the additional level of nesting within > >> "arguments"? > > > > I'd just copied one of the other places; boxed doesn't seem to be used > > that often. > > Then let's box here, it's tidier on the wire. OK, v6 coming up. > > Dave > > > >> Here's how to avoid it: > >> > >> { 'command': 'announce-self', 'boxed': true, > >> 'data' : 'AnnounceParameters' } > > -- > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK