[Top][All Lists]
[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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, (continued)
- [Qemu-devel] [PATCH v5 5/6] block: Convert close calls to qemu_close, Corey Bryant, 2012/07/23
- [Qemu-devel] [PATCH v5 1/6] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg, Corey Bryant, 2012/07/23
- [Qemu-devel] [PATCH v5 4/6] block: Convert open calls to qemu_open, Corey Bryant, 2012/07/23
- [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets, Corey Bryant, 2012/07/23
- Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v5 0/6] file descriptor passing using fd sets, Kevin Wolf, 2012/07/24