Het Gala <het.g...@nutanix.com> wrote: > This patch introduces well defined MigrateAddress struct and its related child > objects. > > The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of > string type. The current migration flow follows double encoding scheme for > fetching migration parameters such as 'uri' and this is not an ideal design. > > Motive for intoducing struct level design is to prevent double encoding of > QAPI > arguments, as Qemu should be able to directly use the QAPI arguments without > any level of encoding. > > Suggested-by: Aravind Retnakaran <aravind.retnaka...@nutanix.com> > Signed-off-by: Het Gala <het.g...@nutanix.com> > --- > qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/qapi/migration.json b/qapi/migration.json > index 82000adce4..bf90bd8fe2 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1423,6 +1423,47 @@ > ## > { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } > > +## > +# @MigrateTransport: > +# > +# The supported communication transport mechanisms for migration > +# > +# @socket: Supported communication type between two devices for migration. > +# Socket is able to cover all of 'tcp', 'unix', 'vsock' and > +# 'fd' already > +# > +# @exec: Supported communication type to redirect migration stream into file. > +# > +# @rdma: Supported communication type to redirect rdma type migration stream. > +# > +# Since 8.0
8.1 I can fix that if it gets acked from someone from QAPI. > +## > +{ 'enum': 'MigrateTransport', > + 'data': ['socket', 'exec', 'rdma'] } > + > +## > +# @MigrateExecCommand: > + # > + # Since 8.0 > + ## > +{ 'struct': 'MigrateExecCommand', > + 'data': {'args': [ 'str' ] } } > + > +## > +# @MigrateAddress: > +# > +# The options available for communication transport mechanisms for migration > +# > +# Since 8.0 > +## > +{ 'union': 'MigrateAddress', > + 'base': { 'transport' : 'MigrateTransport'}, > + 'discriminator': 'transport', > + 'data': { > + 'socket': 'SocketAddress', > + 'exec': 'MigrateExecCommand', > + 'rdma': 'InetSocketAddress' } } > + > ## > # @migrate: > # I will wait for a comment from QAPI people, from migration point of view: Reviewed-by: Juan Quintela <quint...@redhat.com>