qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C
Date: Thu, 22 Sep 2022 15:15:48 +0200

On Thu, Sep 15, 2022 at 10:52 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> The has_FOO for pointer-valued FOO are redundant, except for arrays.
> They are also a nuisance to work with.  Recent commit "qapi: Start to
> elide redundant has_FOO in generated C" provided the means to elide
> them step by step.  This is the step for qapi/migration.json.
>
> Said commit explains the transformation in more detail.  The invariant
> violations mentioned there do not occur here.
>
> Cc: Juan Quintela <quintela@redhat.com>
> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  migration/block-dirty-bitmap.c |  4 ++--
>  migration/colo.c               |  1 -
>  migration/migration.c          | 27 ++++++++-------------------
>  monitor/hmp-cmds.c             | 26 +++++++++++---------------
>  monitor/misc.c                 |  2 +-
>  scripts/qapi/schema.py         |  1 -
>  6 files changed, 22 insertions(+), 39 deletions(-)

> @@ -1556,7 +1548,7 @@ static bool migrate_params_check(MigrationParameters 
> *params, Error **errp)
>  #ifdef CONFIG_LINUX
>      if (migrate_use_zero_copy_send() &&
>          ((params->has_multifd_compression && params->multifd_compression) ||
> -         (params->has_tls_creds && params->tls_creds && 
> *params->tls_creds))) {
> +         (params->tls_creds && params->tls_creds && *params->tls_creds))) {
>          error_setg(errp,
>                     "Zero copy only available for non-compressed non-TLS 
> multifd migration");
>          return false;

Checking params->tls_creds once should be enough ;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]