From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuEEh-0007Sz-0O for qemu-devel@nongnu.org; Wed, 25 Jul 2012 22:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuEEf-0005zX-I2 for qemu-devel@nongnu.org; Wed, 25 Jul 2012 22:55:34 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:37428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuEEf-0005zT-BG for qemu-devel@nongnu.org; Wed, 25 Jul 2012 22:55:33 -0400 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jul 2012 20:55:32 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 5793A19D803C for ; Thu, 26 Jul 2012 02:55:23 +0000 (WET) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6Q2tQLu285348 for ; Wed, 25 Jul 2012 20:55:26 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6Q2ua8L005520 for ; Wed, 25 Jul 2012 20:56:37 -0600 Message-ID: <5010B19C.50508@linux.vnet.ibm.com> Date: Wed, 25 Jul 2012 22:55:24 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1343048885-1701-1-git-send-email-coreyb@linux.vnet.ibm.com> <1343048885-1701-3-git-send-email-coreyb@linux.vnet.ibm.com> <50103815.3090503@redhat.com> In-Reply-To: <50103815.3090503@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, libvir-list@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com On 07/25/2012 02:16 PM, Eric Blake wrote: > 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. > Yes, I agree, I think @fdset_id should be optional. >> +## >> +# @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? > Yes, this makes sense. >> +++ 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. > Ok. -- Regards, Corey