* [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line
@ 2014-06-10 14:17 Nikolay Nikolaev
2014-06-10 14:25 ` Eric Blake
2014-06-11 15:38 ` Michael S. Tsirkin
0 siblings, 2 replies; 4+ messages in thread
From: Nikolay Nikolaev @ 2014-06-10 14:17 UTC (permalink / raw)
To: snabb-devel, qemu-devel; +Cc: a.motakis, luke, tech, n.nikolaev, mst
Fixes remarks:
- rever vhost-force to vhostforce (consistent with tap)
- removed has_unsupported member from VhostUserChardevProps
- removed double error reporting when parsing chardev options
Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
---
net/vhost-user.c | 18 ++++++------------
qapi-schema.json | 4 ++--
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 32b78fb..24e050c 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -26,7 +26,6 @@ typedef struct VhostUserChardevProps {
bool is_socket;
bool is_unix;
bool is_server;
- bool has_unsupported;
} VhostUserChardevProps;
VHostNetState *vhost_user_get_vhost_net(NetClientState *nc)
@@ -172,7 +171,6 @@ static int net_vhost_chardev_opts(const char *name, const char *value,
error_report("vhost-user does not support a chardev"
" with the following option:\n %s = %s",
name, value);
- props->has_unsupported = true;
return -1;
}
return 0;
@@ -190,7 +188,9 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
/* inspect chardev opts */
memset(&props, 0, sizeof(props));
- qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, false);
+ if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, true) != 0) {
+ return NULL;
+ }
if (!props.is_socket || !props.is_unix) {
error_report("chardev \"%s\" is not a unix socket",
@@ -198,12 +198,6 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
return NULL;
}
- if (props.has_unsupported) {
- error_report("chardev \"%s\" has an unsupported option",
- opts->chardev);
- return NULL;
- }
-
qemu_chr_fe_claim_no_fail(chr);
return chr;
@@ -253,9 +247,9 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
return -1;
}
- /* vhost-force for non-MSIX */
- if (vhost_user_opts->has_vhost_force) {
- vhostforce = vhost_user_opts->vhost_force;
+ /* vhostforce for non-MSIX */
+ if (vhost_user_opts->has_vhostforce) {
+ vhostforce = vhost_user_opts->vhostforce;
} else {
vhostforce = false;
}
diff --git a/qapi-schema.json b/qapi-schema.json
index f062ce9..0837fc5 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3273,14 +3273,14 @@
#
# @chardev: name of a unix socket chardev
#
-# @vhost-force: #optional vhost on for non-MSIX virtio guests (default: false).
+# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
#
# Since 2.1
##
{ 'type': 'NetdevVhostUserOptions',
'data': {
'chardev': 'str',
- '*vhost-force': 'bool' } }
+ '*vhostforce': 'bool' } }
##
# @NetClientOptions
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line
2014-06-10 14:17 [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line Nikolay Nikolaev
@ 2014-06-10 14:25 ` Eric Blake
2014-06-11 15:38 ` Michael S. Tsirkin
1 sibling, 0 replies; 4+ messages in thread
From: Eric Blake @ 2014-06-10 14:25 UTC (permalink / raw)
To: Nikolay Nikolaev, snabb-devel, qemu-devel; +Cc: a.motakis, luke, tech, mst
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
On 06/10/2014 08:17 AM, Nikolay Nikolaev wrote:
> Fixes remarks:
> - rever vhost-force to vhostforce (consistent with tap)
s/rever/change/
> - removed has_unsupported member from VhostUserChardevProps
> - removed double error reporting when parsing chardev options
>
> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
> ---
> net/vhost-user.c | 18 ++++++------------
> qapi-schema.json | 4 ++--
> 2 files changed, 8 insertions(+), 14 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line
2014-06-10 14:17 [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line Nikolay Nikolaev
2014-06-10 14:25 ` Eric Blake
@ 2014-06-11 15:38 ` Michael S. Tsirkin
2014-06-11 22:33 ` [Qemu-devel] [snabb-devel] " Nikolay Nikolaev
1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2014-06-11 15:38 UTC (permalink / raw)
To: Nikolay Nikolaev; +Cc: a.motakis, luke, snabb-devel, qemu-devel, tech
On Tue, Jun 10, 2014 at 05:17:05PM +0300, Nikolay Nikolaev wrote:
> Fixes remarks:
> - rever vhost-force to vhostforce (consistent with tap)
> - removed has_unsupported member from VhostUserChardevProps
> - removed double error reporting when parsing chardev options
>
> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Applied, thanks everyone.
Pls take a look at the vhost branch and confirm everything's
in order before I merge this upstream.
Note: you don't need 1/1 if there's a single patch.
> ---
> net/vhost-user.c | 18 ++++++------------
> qapi-schema.json | 4 ++--
> 2 files changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index 32b78fb..24e050c 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -26,7 +26,6 @@ typedef struct VhostUserChardevProps {
> bool is_socket;
> bool is_unix;
> bool is_server;
> - bool has_unsupported;
> } VhostUserChardevProps;
>
> VHostNetState *vhost_user_get_vhost_net(NetClientState *nc)
> @@ -172,7 +171,6 @@ static int net_vhost_chardev_opts(const char *name, const char *value,
> error_report("vhost-user does not support a chardev"
> " with the following option:\n %s = %s",
> name, value);
> - props->has_unsupported = true;
> return -1;
> }
> return 0;
> @@ -190,7 +188,9 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
>
> /* inspect chardev opts */
> memset(&props, 0, sizeof(props));
> - qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, false);
> + if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, true) != 0) {
> + return NULL;
> + }
>
> if (!props.is_socket || !props.is_unix) {
> error_report("chardev \"%s\" is not a unix socket",
> @@ -198,12 +198,6 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
> return NULL;
> }
>
> - if (props.has_unsupported) {
> - error_report("chardev \"%s\" has an unsupported option",
> - opts->chardev);
> - return NULL;
> - }
> -
> qemu_chr_fe_claim_no_fail(chr);
>
> return chr;
> @@ -253,9 +247,9 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
> return -1;
> }
>
> - /* vhost-force for non-MSIX */
> - if (vhost_user_opts->has_vhost_force) {
> - vhostforce = vhost_user_opts->vhost_force;
> + /* vhostforce for non-MSIX */
> + if (vhost_user_opts->has_vhostforce) {
> + vhostforce = vhost_user_opts->vhostforce;
> } else {
> vhostforce = false;
> }
> diff --git a/qapi-schema.json b/qapi-schema.json
> index f062ce9..0837fc5 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3273,14 +3273,14 @@
> #
> # @chardev: name of a unix socket chardev
> #
> -# @vhost-force: #optional vhost on for non-MSIX virtio guests (default: false).
> +# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
> #
> # Since 2.1
> ##
> { 'type': 'NetdevVhostUserOptions',
> 'data': {
> 'chardev': 'str',
> - '*vhost-force': 'bool' } }
> + '*vhostforce': 'bool' } }
>
> ##
> # @NetClientOptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line
2014-06-11 15:38 ` Michael S. Tsirkin
@ 2014-06-11 22:33 ` Nikolay Nikolaev
0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Nikolaev @ 2014-06-11 22:33 UTC (permalink / raw)
To: snabb-devel@googlegroups.com
Cc: Antonios Motakis, Luke Gorrie, VirtualOpenSystems Technical Team,
qemu-devel
Hello,
On Wed, Jun 11, 2014 at 6:38 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Jun 10, 2014 at 05:17:05PM +0300, Nikolay Nikolaev wrote:
>> Fixes remarks:
>> - rever vhost-force to vhostforce (consistent with tap)
>> - removed has_unsupported member from VhostUserChardevProps
>> - removed double error reporting when parsing chardev options
>>
>> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
>
> Applied, thanks everyone.
> Pls take a look at the vhost branch and confirm everything's
> in order before I merge this upstream.
>
I have checked out git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
branch 'vhost' and rebased on top of branch 'numa' in order to test
it.
However I found out that instead of "-object memory-file" I have to
use "-object memory-backend-file". If this is the syntax that is going
to stay then I'll have to send fixups to 12, 15 and 18. Please
confirm.
regards,
Nikolay Nikolaev
> Note: you don't need 1/1 if there's a single patch.
>
>> ---
>> net/vhost-user.c | 18 ++++++------------
>> qapi-schema.json | 4 ++--
>> 2 files changed, 8 insertions(+), 14 deletions(-)
>>
>> diff --git a/net/vhost-user.c b/net/vhost-user.c
>> index 32b78fb..24e050c 100644
>> --- a/net/vhost-user.c
>> +++ b/net/vhost-user.c
>> @@ -26,7 +26,6 @@ typedef struct VhostUserChardevProps {
>> bool is_socket;
>> bool is_unix;
>> bool is_server;
>> - bool has_unsupported;
>> } VhostUserChardevProps;
>>
>> VHostNetState *vhost_user_get_vhost_net(NetClientState *nc)
>> @@ -172,7 +171,6 @@ static int net_vhost_chardev_opts(const char *name, const char *value,
>> error_report("vhost-user does not support a chardev"
>> " with the following option:\n %s = %s",
>> name, value);
>> - props->has_unsupported = true;
>> return -1;
>> }
>> return 0;
>> @@ -190,7 +188,9 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
>>
>> /* inspect chardev opts */
>> memset(&props, 0, sizeof(props));
>> - qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, false);
>> + if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, true) != 0) {
>> + return NULL;
>> + }
>>
>> if (!props.is_socket || !props.is_unix) {
>> error_report("chardev \"%s\" is not a unix socket",
>> @@ -198,12 +198,6 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
>> return NULL;
>> }
>>
>> - if (props.has_unsupported) {
>> - error_report("chardev \"%s\" has an unsupported option",
>> - opts->chardev);
>> - return NULL;
>> - }
>> -
>> qemu_chr_fe_claim_no_fail(chr);
>>
>> return chr;
>> @@ -253,9 +247,9 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
>> return -1;
>> }
>>
>> - /* vhost-force for non-MSIX */
>> - if (vhost_user_opts->has_vhost_force) {
>> - vhostforce = vhost_user_opts->vhost_force;
>> + /* vhostforce for non-MSIX */
>> + if (vhost_user_opts->has_vhostforce) {
>> + vhostforce = vhost_user_opts->vhostforce;
>> } else {
>> vhostforce = false;
>> }
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index f062ce9..0837fc5 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -3273,14 +3273,14 @@
>> #
>> # @chardev: name of a unix socket chardev
>> #
>> -# @vhost-force: #optional vhost on for non-MSIX virtio guests (default: false).
>> +# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
>> #
>> # Since 2.1
>> ##
>> { 'type': 'NetdevVhostUserOptions',
>> 'data': {
>> 'chardev': 'str',
>> - '*vhost-force': 'bool' } }
>> + '*vhostforce': 'bool' } }
>>
>> ##
>> # @NetClientOptions
>
> --
> You received this message because you are subscribed to the Google Groups "Snabb Switch development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to snabb-devel+unsubscribe@googlegroups.com.
> To post to this group, send an email to snabb-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/snabb-devel.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-11 22:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 14:17 [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line Nikolay Nikolaev
2014-06-10 14:25 ` Eric Blake
2014-06-11 15:38 ` Michael S. Tsirkin
2014-06-11 22:33 ` [Qemu-devel] [snabb-devel] " Nikolay Nikolaev
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).