diff mbox series

[1/9] vhost-vdpa: remove the default devname

Message ID 20200831082737.10983-2-jasowang@redhat.com
State New
Headers show
Series refine vhost-vdpa initialization | expand

Commit Message

Jason Wang Aug. 31, 2020, 8:27 a.m. UTC
The code doesn't have a default vhostdev, so remove the default
description in net.json.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 qapi/net.json | 1 -
 1 file changed, 1 deletion(-)

Comments

Laurent Vivier Sept. 9, 2020, 8:40 a.m. UTC | #1
On 31/08/2020 10:27, Jason Wang wrote:
> The code doesn't have a default vhostdev, so remove the default
> description in net.json.
> 
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
>  qapi/net.json | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/qapi/net.json b/qapi/net.json
> index ddb113e5e5..a2a94fad3e 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -438,7 +438,6 @@
>  # specifications with a vendor specific control path.
>  #
>  # @vhostdev: path of vhost-vdpa device
> -#            (default:'/dev/vhost-vdpa-0')
>  #
>  # @queues: number of queues to be created for multiqueue vhost-vdpa
>  #          (default: 1)
> 

If you remove the default, you must also set the parameter as not
optional (remove the star in front of its declaration):

diff --git a/qapi/net.json b/qapi/net.json
index ddb113e5e5a8..012830ca1a27 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -447,7 +447,7 @@
 ##
 { 'struct': 'NetdevVhostVDPAOptions',
   'data': {
-    '*vhostdev':     'str',
+    'vhostdev':     'str',
     '*queues':       'int' } }

 ##


And then you'll have:

$ ./qemu-system-x86_64  -netdev vhost-vdpa,id=hostnet1
qemu-system-x86_64: Parameter 'vhostdev' is missing

And PATCH 2 becomes useless.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/qapi/net.json b/qapi/net.json
index ddb113e5e5..a2a94fad3e 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -438,7 +438,6 @@ 
 # specifications with a vendor specific control path.
 #
 # @vhostdev: path of vhost-vdpa device
-#            (default:'/dev/vhost-vdpa-0')
 #
 # @queues: number of queues to be created for multiqueue vhost-vdpa
 #          (default: 1)