From: Peter Xu <peterx@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
qemu-devel@nongnu.org, "Zhiyi Guo" <zhguo@redhat.com>,
"Leonardo Bras Soares Passos" <lsoaresp@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Juan Quintela" <quintela@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Chensheng Dong" <chdong@redhat.com>
Subject: Re: [PATCH for-8.2 v2 1/2] qapi/migration: Deduplicate migration parameter field comments
Date: Tue, 8 Aug 2023 16:03:46 -0400 [thread overview]
Message-ID: <ZNKfoqM0V6pcvrz/@x1n> (raw)
In-Reply-To: <ZM/BGoSiDutVUoTF@xz-m1.local>
On Sun, Aug 06, 2023 at 11:49:46AM -0400, Peter Xu wrote:
> > I think we have a tradeoff here. If perpetuating the unclean and ugly
> > use of "" is what it takes to de-triplicate migration parameters, we may
> > decide to accept that.
>
> I don't think it's a must. As Dan raised, we can convert str -> StrOrNull
> for MigrationParameters. I assume it won't affect query-migrate-parameters
> anyway OTOH.
>
> I assume it means there's nothing yet obvious that we overlooked on the
> whole idea. Let me propose the formal patchset early next week. It'll be
> mostly the patch I attached but just add those extra logics for StrOrNull,
> so the diffstat might be less attractive but hopefully still good enough to
> be accepted.
The new StrOrNull approach doesn't work with current migration object
properties.. as StrOrNull must be a pointer for @MigrationParameters not
static, and it stops working with offsetof():
../migration/options.c:218:5: error: cannot apply ‘offsetof’ to a non constant address
218 | DEFINE_PROP_STRING("tls-creds", MigrationState, parameters.tls_creds->u.s),
| ^~~~~~~~~~~~~~~~~~
../migration/options.c:219:5: error: cannot apply ‘offsetof’ to a non constant address
219 | DEFINE_PROP_STRING("tls-hostname", MigrationState, parameters.tls_hostname->u.s),
| ^~~~~~~~~~~~~~~~~~
../migration/options.c:220:5: error: cannot apply ‘offsetof’ to a non constant address
220 | DEFINE_PROP_STRING("tls-authz", MigrationState, parameters.tls_authz->u.s),
| ^~~~~~~~~~~~~~~~~~
Any easy way to fix this? I.e., is there a way to declare StrOrNull (in
MigrationParameters of qapi/migration.json) to be statically allocated
rather than a pointer (just like default behavior of any uint* types)?
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2023-08-08 20:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 15:53 [PATCH for-8.2 v2 0/2] migration: Add max-switchover-bandwidth parameter Peter Xu
2023-08-03 15:53 ` [PATCH for-8.2 v2 1/2] qapi/migration: Deduplicate migration parameter field comments Peter Xu
2023-08-04 12:28 ` Markus Armbruster
2023-08-04 13:59 ` Daniel P. Berrangé
2023-08-04 16:01 ` Peter Xu
2023-08-04 16:29 ` Daniel P. Berrangé
2023-08-04 16:46 ` Peter Xu
2023-08-04 16:48 ` Daniel P. Berrangé
2023-08-04 21:02 ` Peter Xu
2023-08-05 8:12 ` Markus Armbruster
2023-08-06 15:49 ` Peter Xu
2023-08-08 20:03 ` Peter Xu [this message]
2023-08-14 22:24 ` Peter Xu
2023-08-03 15:53 ` [PATCH for-8.2 v2 2/2] migration: Allow user to specify migration switchover bandwidth Peter Xu
2023-08-31 18:14 ` Joao Martins
2023-08-31 18:34 ` Peter Xu
2023-09-01 6:55 ` Wang, Lei
2023-09-01 8:37 ` Daniel P. Berrangé
2023-09-01 14:40 ` Peter Xu
2023-09-05 16:46 ` Peter Xu
2023-09-05 17:39 ` Daniel P. Berrangé
2023-09-06 2:27 ` Wang, Lei
2023-09-01 17:59 ` Joao Martins
2023-09-01 18:39 ` Joao Martins
2023-09-05 15:31 ` Peter Xu
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=ZNKfoqM0V6pcvrz/@x1n \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=chdong@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=lsoaresp@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=zhguo@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.