From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Knut Omang <knuto@ifi.uio.no>
Subject: Re: [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again
Date: Thu, 22 Oct 2015 06:22:29 -0600 [thread overview]
Message-ID: <5628D505.20203@redhat.com> (raw)
In-Reply-To: <1445509543-30679-1-git-send-email-berrange@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]
On 10/22/2015 04:25 AM, Daniel P. Berrange wrote:
> Revert the qapi-schema.json change done in:
>
> commit 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0
> Author: Daniel P. Berrange <berrange@redhat.com>
> Date: Tue Sep 1 14:46:50 2015 +0100
>
> sockets: allow port to be NULL when listening on IP address
>
> Switching "port" from mandatory to optional causes the QAPI
> code generator to add a 'has_port' field to the InetSocketAddress
> struct. No code that created InetSocketAddress objects was updated
> to set 'has_port = true', which caused the non-NULL port strings
> to be silently dropped when copying InetSocketAddress objects.
>
> Reported-by: Knut Omang <knuto@ifi.uio.no>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> qapi-schema.json | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Yes, I have plans for a qapi improvement that will let us mark strings
where we want the convention of memb == NULL rather than has_memb ==
false (flipping the switch globally would touch too much code in one
commit, so a marker saying which structs are okay with the idea will
make it possible to convert smaller portions at a time - although we may
want to do the cleanup over the entire tree and then drop the marker).
But since I haven't posted patches on that front yet, it's missed
softfreeze and will be something for 2.6.
So this patch is necessary for 2.5.
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index f60be29..702b7b5 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2614,9 +2614,7 @@
> #
> # @host: host part of the address
> #
> -# @port: port part of the address, or lowest port if @to is present.
> -# Kernel selects a free port if omitted for listener addresses.
> -# #optional
> +# @port: port part of the address, or lowest port if @to is present
Don't you still want to allow an empty string as the way to allow kernel
port selection?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-10-22 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 10:25 [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again Daniel P. Berrange
2015-10-22 12:22 ` Eric Blake [this message]
2015-10-22 12:42 ` Daniel P. Berrange
2015-10-22 13:57 ` Eric Blake
2015-10-29 6:32 ` Markus Armbruster
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=5628D505.20203@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=knuto@ifi.uio.no \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.