Re: [PATCH 4/7] remote generator: Handle stream-using functions

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

 



On Mon, May 23, 2011 at 07:36:07PM +0200, Matthias Bolte wrote:
> Extend procedure annotation in the .x file for stream handling.
> 
> Adds a missing remoteStreamRelease call to remoteDomainScreenshot
> error path.
> ---
>  daemon/remote.c              |  238 ------------------------------------------
>  daemon/remote_generator.pl   |  114 +++++++++++++++++----
>  src/remote/remote_driver.c   |  207 ------------------------------------
>  src/remote/remote_protocol.x |   38 +++++---
>  4 files changed, 120 insertions(+), 477 deletions(-)


> diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
> index 63f7ebb..5b9300a 100644
> --- a/src/remote/remote_protocol.x
> +++ b/src/remote/remote_protocol.x
> @@ -2054,7 +2054,14 @@ const REMOTE_PROTOCOL_VERSION = 1;
>  enum remote_procedure {
>      /* Each function must have a two-word comment.  The first word is
>       * whether remote_generator.pl handles daemon, the second whether
> -     * it handles src/remote.  */
> +     * it handles src/remote.  Additional flags can be specified after a
> +     * pipe.
> +     *
> +     * The (readstream|writestream)@<offset> flag lets daemon and src/remote
> +     * create a stream.  The direction is defined from the src/remote point
> +     * of view.  A readstream transfers data from daemon to src/remote.  The
> +     * <offset> specifies at which offset the stream parameter is inserted
> +     * in the function parameter list. */
>      REMOTE_PROC_OPEN = 1, /* skipgen skipgen */
>      REMOTE_PROC_CLOSE = 2, /* skipgen skipgen */
>      REMOTE_PROC_GET_TYPE = 3, /* autogen skipgen */
> @@ -2216,7 +2223,7 @@ enum remote_procedure {
>      REMOTE_PROC_SECRET_GET_VALUE = 145, /* skipgen skipgen */
>      REMOTE_PROC_SECRET_UNDEFINE = 146, /* autogen autogen */
>      REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147, /* autogen autogen */
> -    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* autogen autogen | writestream@1 */
>      REMOTE_PROC_IS_SECURE = 149, /* autogen skipgen */
>      REMOTE_PROC_DOMAIN_IS_ACTIVE = 150, /* autogen autogen */
>  
> @@ -2275,35 +2282,40 @@ enum remote_procedure {
>      REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199, /* autogen autogen */
>      REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200, /* autogen autogen */
>  
> -    REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* autogen autogen | readstream@2 */

Technically this is a bi-directional stream, but that doesn't
matter from a code-gen POV, so fine.

>      REMOTE_PROC_DOMAIN_IS_UPDATED = 202, /* autogen autogen */
>      REMOTE_PROC_GET_SYSINFO = 203, /* autogen autogen */
>      REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204, /* autogen autogen */
>      REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, /* autogen autogen */
> -    REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* skipgen skipgen */
> -    REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* skipgen skipgen */
> +    REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* autogen autogen | writestream@1 */
> +    REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* autogen autogen | readstream@1 */
>      REMOTE_PROC_DOMAIN_INJECT_NMI = 210, /* autogen autogen */
>  
> -    REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* skipgen autogen | readstream@1 */
>      REMOTE_PROC_DOMAIN_GET_STATE = 212, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214, /* skipgen skipgen */
> -    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215, /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215, /* autogen skipgen | writestream@1 */
>      REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218, /* skipgen skipgen */
>      REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219 /* skipgen skipgen */
>  
> -    /*
> -     * Notice how the entries are grouped in sets of 10 ?
> +    /* Notice how the entries are grouped in sets of 10 ?
>       * Nice isn't it. Please keep it this way when adding more.
> -     */
> -
> -    /* Each function must have a two-word comment.  The first word is
> +     *
> +     * Each function must have a two-word comment.  The first word is
>       * whether remote_generator.pl handles daemon, the second whether
> -     * it handles src/remote.  */
> +     * it handles src/remote.  Additional flags can be specified after a
> +     * pipe.
> +     *
> +     * The (readstream|writestream)@<offset> flag lets daemon and src/remote
> +     * create a stream.  The direction is defined from the src/remote point
> +     * of view.  A readstream transfers data from daemon to src/remote.  The
> +     * <offset> specifies at which offset the stream parameter is inserted
> +     * in the function parameter list. */
>  };

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]