opened
devimc
username_0
vhost is a Netdev Tap Option used to configure a host TAP network interface
backend, according to the QMP API documentation the type for such option must
be a boolean. Use boolean type for vhost option to fix the following
error on recent versions of QEMU:

```
Invalid parameter type for 'vhost', expected: boolean
```

cc @amshinde
qemu/qmp: use boolean type for the vhost
issue
created
devimc
username_0
@username_1 @username_2  please take a look :smile:
comment
created
fidencio
username_1
Okay, let me take my "lgtm" back, at least till we hear from QEMU folks about this
comment
created
devimc
username_0
from QMP API perspective `"vhost": true` and `"vhost": "on"` are the same, aren't they?

cc @dagrh @username_3
comment
created
jodh-intel
username_2
@username_0 - I was wondering that myself, but a quick skim over QEMU failed to find the code that handles expanding the string bool value to a `bool`. If "true", "on", "yes", "1" equate to `true` and everything else to `false` for example, that should be documented in QEMU imho as the docs seem consistent in `bool` options being either set to "on" or "off".
comment
created
stefanha
username_3
@username_0 QMP uses JSON representation and the types need to conform to the schema (qapi/net.json). Inputs that don't conform to the schema are normally detected but in the netdev_add case there were some non-conformant inputs that worked until recently.

You could raise this on qemu-devel but it's likely the discussion would lead to an outcome along the lines of "Sorry, those inputs do not conform to the QMP JSON schema, which is the official API. Allowing non-conformant inputs again is not feasible. Please follow the schema in the future to avoid incompatibilities".
comment
created
devimc
username_0
thanks @username_3 

according to the QMP API schema, `vhost` is declared as a bool (`true` or `false`) not as a string (`"on"` or `"off"`) [1], having said that, I think this PR is ready to land

[1] - https://github.com/qemu/qemu/blob/cccdd8c7971896c339d59c9c5d4647d4ffd9568a/qapi/net.json#L245
comment