qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v2 4/9] vhost-vdpa: introduce vhost-vdpa net client


From: Eric Blake
Subject: Re: [RFC v2 4/9] vhost-vdpa: introduce vhost-vdpa net client
Date: Fri, 8 May 2020 11:41:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/8/20 11:32 AM, Cindy Lu wrote:
From: Tiwei Bie <address@hidden>

This patch set introduces a new net client type: vhost-vdpa.
vhost-vdpa net client will set up a vDPA device which is specified
by a "vhostdev" parameter.

Co-authored-by: Lingshan Zhu <address@hidden>
Signed-off-by: Cindy Lu <address@hidden>
---

Just looking at UI:


+++ b/qapi/net.json
@@ -441,6 +441,23 @@
      '*queues':        'int' } }
##
+# @NetdevVhostVDPAOptions:
+#
+# Vhost-vdpa network backend
+#
+# @vhostdev: name of a vdpa dev path in sysfs
+#
+# @queues: number of queues to be created for multiqueue vhost-vdpa
+#          (default: 1) (Since 5.1)

No need to mark a 'since' tag on a member introduced at the same time as the overall struct itself.

+#
+# Since: 5.1
+##
+{ 'struct': 'NetdevVhostVDPAOptions',
+  'data': {
+    '*vhostdev':     'str',

What does this default to if omitted?

+    '*fd':           'str',

Not documented above.

+    '*queues':       'int' } }
+##

Missing blank line separator.

  # @NetClientDriver:
  #
  # Available netdev drivers.
@@ -451,7 +468,7 @@
  ##
  { 'enum': 'NetClientDriver',
    'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
-            'bridge', 'hubport', 'netmap', 'vhost-user' ] }
+            'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa' ] }

Missing a line above that 'vhost-vdpa' is new to 5.1.


@@ -2749,6 +2756,18 @@ qemu -m 512 -object 
memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,sha
       -device virtio-net-pci,netdev=net0
  @end example
+@item -netdev vhost-vdpa,vhostdev=/path/to/dev
+Establish a vhost-vdpa netdev, backed by a vhostdev. The chardev should
+be a unix domain socket backed one. The vhost-vdpa uses a specifically defined
+protocol to pass vhost ioctl replacement messages to an application on the 
other
+end of the socket.
+Example:
+@example
+qemu -m 512 -object 
memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
+     -numa node,memdev=mem \
+     -netdev type=vhost-vdpa,id=net0,vhostdev=/path/to/dev \
+     -device virtio-net-pci,netdev=net0
+@end example
  @item -netdev hubport,id=@var{id},hubid=@var{hubid}[,netdev=@var{nd}]
Create a hub port on the emulated hub with ID @var{hubid}.


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




reply via email to

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