All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Eric Blake <eblake@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org, Laurent Vivier <lvivier@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v13 2/3] migration: Create socket-address parameter
Date: Fri, 01 Mar 2019 16:42:27 +0100	[thread overview]
Message-ID: <87d0namwik.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <87d0nl1e0b.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Thu, 21 Feb 2019 14:12:52 +0100")

Markus Armbruster <armbru@redhat.com> writes:

> Eric Blake <eblake@redhat.com> writes:
[...]
>> That says we have a bug in our QAPI generator - the type
>> SocketAddressList should be auto-generated at the point where it is
>> needed in migration.json. Markus, any ideas why we are not properly
>> auto-generating an array type when the only use of that array comes from
>> a different module than where the original type was declared?
>
> With the DummyStruct, we generate SocketAddressList stuff into
> qapi-{types,visit}-sockets.[ch].
>
> Without it, we it ends up in qapi-{types,visit}-block-core.[ch].  How
> come?
>
> We create non-builtin array types on demand, i.e. on first use, by
> calling ._make_array_type().
>
> Like any other non-builtin type, an array type takes an info tuple
> describing where it's defined.  We pass it the info of whatever
> triggered its creation.  That's not as silly as it may sound; it can be
> viewed as a definition.
>
> However, it falls apart when we use the info to set the type's module,
> in ._def_entity().  The module dicates where the generated code goes.
> The array type's module becomes whatever module uses it first.  It
> should be its element type's module instead.
>
> Needs fixing.
>
> If you don't want to wait for the fix, commit the DummyStruct
> work-around with a big fat FIXME comment.

Proposed fix:
Subject: [PATCH 0/7] qapi: Code generation fixes
Message-Id: <20190301154051.23317-1-armbru@redhat.com>

  reply	other threads:[~2019-03-01 15:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  9:22 [Qemu-devel] [PATCH v13 0/3] Add make check tests for Migration Juan Quintela
2019-02-20  9:22 ` [Qemu-devel] [PATCH v13 1/3] tests: Add migration xbzrle test Juan Quintela
2019-02-20  9:22 ` [Qemu-devel] [PATCH v13 2/3] migration: Create socket-address parameter Juan Quintela
2019-02-20 14:03   ` Eric Blake
2019-02-21 13:12     ` Markus Armbruster
2019-03-01 15:42       ` Markus Armbruster [this message]
2019-02-20  9:22 ` [Qemu-devel] [PATCH v13 3/3] tests: Add basic migration precopy tcp test Juan Quintela
2019-02-20 10:20   ` Thomas Huth

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=87d0namwik.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.