qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets
Date: Wed, 25 Jul 2012 12:16:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 07/23/2012 07:08 AM, Corey Bryant wrote:
> This patch adds support that enables passing of file descriptors
> to the QEMU monitor where they will be stored in specified file
> descriptor sets.
> 
> +##
> +# @add-fd:
> +#
> +# Add a file descriptor, that was passed via SCM rights, to an fd set.
> +#
> +# @fdset_id: The ID of the fd set to add the file descriptor to.

Should this parameter be optional, in which case qemu generates the set
number as the next available?  The return information would include the
set number whether or not this parameter was present from the caller,
and allowing it to be optional makes it slightly easier for callers to
generate a new set without having to make the caller track which set ids
are in use.

> +##
> +# @remove-fd:
> +#
> +# Remove a file descriptor from an fd set.
> +#
> +# @fdset_id: The ID of the fd set that the file descriptor belongs to.
> +#
> +# @fd: The file descriptor that is to be removed.

Should 'fd' be optional, as a shorthand for saying that _all_ fds
belonging to the set be marked as removed at once?

> +++ b/qmp-commands.hx
> @@ -926,6 +926,127 @@ Example:
>  
>  EQMP
>  
> +     {
> +        .name       = "add-fd",
> +        .args_type  = "fdset_id:i",
> +        .params     = "add-fd fdset_id",
> +        .help       = "Add a file descriptor, that was passed via SCM 
> rights, to an fd set",
> +        .mhandler.cmd_new = qmp_marshal_input_add_fd,
> +    },
> +
> +SQMP
> +add-fd
> +-------
> +
> +Add a file descriptor, that was passed via SCM rights, to an fd set.
> +
> +Arguments:
> +
> +- "fdset_id": The ID of the fd set to add the file descriptor to.  (json-int)

May need tweaking, based on the answers to the above questions.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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