From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, jasowang@redhat.com, quintela@redhat.com,
mst@redhat.com, eblake@redhat.com, armbru@redhat.com,
germano@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/9] migration: Add announce parameters
Date: Wed, 30 Jan 2019 10:59:10 +0000 [thread overview]
Message-ID: <20190130105910.GI15904@redhat.com> (raw)
In-Reply-To: <20190130105404.GA2677@work-vm>
On Wed, Jan 30, 2019 at 10:54:04AM +0000, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berrange@redhat.com) wrote:
> > On Wed, Jan 30, 2019 at 10:32:29AM +0000, Dr. David Alan Gilbert (git) wrote:
> > > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > >
> > > Add migration parameters that control RARP/GARP announcement timeouts.
> > >
> > > Based on earlier patches by myself and
> > > Vladislav Yasevich <vyasevic@redhat.com>
> > >
> > > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > > ---
> > > hmp.c | 28 +++++++++++
> > > include/migration/misc.h | 2 +
> > > include/qemu/typedefs.h | 1 +
> > > migration/migration.c | 100 +++++++++++++++++++++++++++++++++++++++
> > > qapi/migration.json | 54 +++++++++++++++++++--
> > > 5 files changed, 182 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/qapi/migration.json b/qapi/migration.json
> > > index 7a795ecc16..113bb5d925 100644
> > > --- a/qapi/migration.json
> > > +++ b/qapi/migration.json
> > > @@ -6,6 +6,7 @@
> > > ##
> > >
> > > { 'include': 'common.json' }
> > > +{ 'include': 'net.json' }
> >
> >
> > > @@ -572,6 +588,18 @@
> > > ##
> > > # @MigrateSetParameters:
> > > #
> > > +# @announce-initial: Initial delay (in ms) before sending the first announce
> > > +# (Since 4.0)
> > > +#
> > > +# @announce-max: Maximum delay (in ms) between packets in the announcment
> > > +# (Since 4.0)
> > > +#
> > > +# @announce-rounds: Number of self-announce packets sent after migration
> > > +# (Since 4.0)
> > > +#
> > > +# @announce-step: Increase in delay (in ms) between subsequent packets in
> > > +# the announcement (Since 4.0)
> > > +#
> > > # @compress-level: compression level
> > > #
> > > # @compress-threads: compression thread count
> > > @@ -653,7 +681,11 @@
> > > # TODO either fuse back into MigrationParameters, or make
> > > # MigrationParameters members mandatory
> > > { 'struct': 'MigrateSetParameters',
> > > - 'data': { '*compress-level': 'int',
> > > + 'data': { '*announce-initial': 'size',
> > > + '*announce-max': 'size',
> > > + '*announce-rounds': 'size',
> > > + '*announce-step': 'size',
> > > + '*compress-level': 'int',
> > > '*compress-threads': 'int',
> > > '*compress-wait-thread': 'bool',
> > > '*decompress-threads': 'int',
> >
> > Historically we've just had a flat list of migration parameters, but
> > QAPI doesn't require this. So I wonder about just referencing the
> > type you defined in the previous patch:
> >
> > '*announce': 'AnnounceParameters
> >
> > from a QMP pov this is trivial & feels more natural. The only downside
> > I see is that for HMP it would need to be flattened to what it is here.
> > We generally tend to prefer QMP's natural style, even if it doesn't
> > match what's nicest for HMP.
>
> I don't trust that's true from QMP; the logic to keep the parameters
> optional so that you can set a parameter individually is already pretty
> hairy.
Yes, this different design would mean that the overall 'announce' parmaeter
was optional. If you did provide one of the parameters though, you would
need to provide all 4 of them. I don't think that's a bad thing though, as
the values really only make sense when considered as a whole. So setting
one announce parameter without knowing what the other values are is somewhat
unreliable.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-01-30 10:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 10:32 [Qemu-devel] [PATCH v2 0/9] Network announce changes Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 1/9] net: Introduce announce timer Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 2/9] migration: Add announce parameters Dr. David Alan Gilbert (git)
2019-01-30 10:43 ` Daniel P. Berrangé
2019-01-30 10:54 ` Dr. David Alan Gilbert
2019-01-30 10:59 ` Daniel P. Berrangé [this message]
2019-01-30 12:01 ` Dr. David Alan Gilbert
2019-01-30 14:48 ` Daniel P. Berrangé
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 3/9] virtio-net: Switch to using announce timer Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 4/9] migration: " Dr. David Alan Gilbert (git)
2019-01-30 10:47 ` Daniel P. Berrangé
2019-01-30 16:41 ` Michael S. Tsirkin
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 5/9] net: Add a network device specific self-announcement ability Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 6/9] virtio-net: Allow qemu_announce_self to trigger virtio announcements Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 7/9] qmp: Add announce-self command Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 8/9] hmp: Add hmp_announce_self Dr. David Alan Gilbert (git)
2019-01-30 10:32 ` [Qemu-devel] [PATCH v2 9/9] tests: Add a test for qemu self announcements Dr. David Alan Gilbert (git)
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=20190130105910.GI15904@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=germano@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).