qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Cindy Lu <lulu@redhat.com>, Jason Wang <jasowang@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Michael Tsirkin <mst@redhat.com>
Subject: Re: [PATCH 9/9] vhost-vdpa: allow pre-opend file descriptor
Date: Wed, 16 Sep 2020 11:04:17 -0500	[thread overview]
Message-ID: <29454777-87fa-c42c-122b-bef4fd708464@redhat.com> (raw)
In-Reply-To: <CACLfguWu6fu3_PkfcTLZriTk=BqWk4a+=myfH+cFpQuHLu0koQ@mail.gmail.com>

On 8/31/20 6:16 AM, Cindy Lu wrote:
> On Mon, 31 Aug 2020 at 16:30, Jason Wang <jasowang@redhat.com> wrote:
>>
>> This patch allows to initialize vhost-vdpa network backend with pre
>> opened vhost-vdpa file descriptor. This is useful for running
>> unprivileged qemu through libvirt.
>>
>> Cc: Eric Blake <eblake@redhat.com>
>> Cc: Markus Armbruster <armbru@redhat.com>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> ---

>> +++ b/qapi/net.json
>> @@ -442,12 +442,15 @@
>>   # @queues: number of queues to be created for multiqueue vhost-vdpa
>>   #          (default: 1)
>>   #
>> +# @fd: file descriptor of an already opened vhost-vdpa (since 5.2)
>> +#
>>   # Since: 5.1
>>   ##
>>   { 'struct': 'NetdevVhostVDPAOptions',
>>     'data': {
>>       '*vhostdev':     'str',
>> -    '*queues':       'int' } }
>> +    '*queues':       'int',
>> +    '*fd':           'str' } }
>>
>>   ##
>>   # @NetClientDriver:
>> --
>> 2.20.1
>>
> I think the latest  code supported this part.
> you can pass a pre open file descriptor to it via the add-fd QMP
> command to /dev/fdset/NNN, and then pass the string
> "/dev/fdset/NNN" as vhostdev.  so we don't need a special fd parameter here.

Correct - the 'vhostdev' parameter + magic filename is all the more that 
is needed to access a pre-opened fd, so no 'fd' parameter should be added.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



      parent reply	other threads:[~2020-09-16 16:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31  8:27 [PATCH 0/9] refine vhost-vdpa initialization Jason Wang
2020-08-31  8:27 ` [PATCH 1/9] vhost-vdpa: remove the default devname Jason Wang
2020-09-09  8:40   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 2/9] vhost-vdpa: mandate vhostdev Jason Wang
2020-09-09  8:42   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 3/9] vhost-vdpa: remove the unnecessary assert(s->vhost_net) Jason Wang
2020-08-31  8:27 ` [PATCH 4/9] vhost-vdpa: refine info string Jason Wang
2020-09-16 15:52   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 5/9] vhost-vdpa: remove the unnecessary initialization Jason Wang
2020-09-16 15:53   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 6/9] vhost-vdpa: remove the unnecessary queue index assignment Jason Wang
2020-09-16 15:54   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 7/9] vhost-vdpa: squash net_vhost_vdpa_init() into net_init_vhost_vdpa() Jason Wang
2020-09-16 15:58   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 8/9] vhost-vdpa: add accurate error string when fail to open vhost vDPA device Jason Wang
2020-09-16 16:09   ` Laurent Vivier
2020-08-31  8:27 ` [PATCH 9/9] vhost-vdpa: allow pre-opend file descriptor Jason Wang
2020-08-31 11:16   ` Cindy Lu
2020-09-01  6:53     ` Jason Wang
2020-09-16 16:04     ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29454777-87fa-c42c-122b-bef4fd708464@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lulu@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).