On 5/8/20 11:32 AM, Cindy Lu wrote:
From: Tiwei Bie <tiwei....@intel.com>
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 <lingshan....@intel.com>
Signed-off-by: Cindy Lu <l...@redhat.com>
---
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