* [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
@ 2015-11-16 12:35 Michael S. Tsirkin
2015-11-16 12:58 ` Marc-André Lureau
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2015-11-16 12:35 UTC (permalink / raw)
To: qemu-devel
Cc: Marcel Apfelbaum, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=,
Yuanhan Liu, Paolo Bonzini
vhost-user-test is broken now: it assumes
QEMU sends RESET_OWNER, and we stopped doing that.
Wait for ENABLE_RING with 0 instead.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/vhost-user-test.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 01cfc7e..022223b 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -70,6 +70,7 @@ typedef enum VhostUserRequest {
VHOST_USER_SET_VRING_ERR = 14,
VHOST_USER_GET_PROTOCOL_FEATURES = 15,
VHOST_USER_SET_PROTOCOL_FEATURES = 16,
+ VHOST_USER_SET_VRING_ENABLE = 18,
VHOST_USER_MAX
} VhostUserRequest;
@@ -315,8 +316,10 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
g_cond_signal(&s->data_cond);
break;
- case VHOST_USER_RESET_OWNER:
- s->fds_num = 0;
+ case VHOST_USER_SET_VRING_ENABLE:
+ if (!msg.payload.state.num) {
+ s->fds_num = 0;
+ }
break;
default:
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
2015-11-16 12:35 [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE Michael S. Tsirkin
@ 2015-11-16 12:58 ` Marc-André Lureau
2015-11-16 13:25 ` Marc-André Lureau
0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2015-11-16 12:58 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Marcel Apfelbaum, Marc-André Lureau, Yuanhan Liu, qemu-devel,
Paolo Bonzini
Hi
That patch doesn't work, vhost-user-test fails:
ERROR:tests/vhost-user-test.c:491:test_migrate_source_check: assertion failed: (!overlap)
----- Original Message -----
> vhost-user-test is broken now: it assumes
> QEMU sends RESET_OWNER, and we stopped doing that.
> Wait for ENABLE_RING with 0 instead.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> tests/vhost-user-test.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
> index 01cfc7e..022223b 100644
> --- a/tests/vhost-user-test.c
> +++ b/tests/vhost-user-test.c
> @@ -70,6 +70,7 @@ typedef enum VhostUserRequest {
> VHOST_USER_SET_VRING_ERR = 14,
> VHOST_USER_GET_PROTOCOL_FEATURES = 15,
> VHOST_USER_SET_PROTOCOL_FEATURES = 16,
> + VHOST_USER_SET_VRING_ENABLE = 18,
> VHOST_USER_MAX
> } VhostUserRequest;
>
> @@ -315,8 +316,10 @@ static void chr_read(void *opaque, const uint8_t *buf,
> int size)
> g_cond_signal(&s->data_cond);
> break;
>
> - case VHOST_USER_RESET_OWNER:
> - s->fds_num = 0;
> + case VHOST_USER_SET_VRING_ENABLE:
> + if (!msg.payload.state.num) {
> + s->fds_num = 0;
> + }
> break;
>
> default:
> --
> MST
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
2015-11-16 12:58 ` Marc-André Lureau
@ 2015-11-16 13:25 ` Marc-André Lureau
0 siblings, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2015-11-16 13:25 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Marcel Apfelbaum, Marc-André Lureau, Yuanhan Liu, qemu-devel,
Paolo Bonzini
Hi
----- Original Message -----
> Hi
>
> That patch doesn't work, vhost-user-test fails:
>
> ERROR:tests/vhost-user-test.c:491:test_migrate_source_check: assertion
> failed: (!overlap)
Actually, with "vhost: let SET_VRING_ENABLE message depends on protocol feature" it works
ack after that patch.
>
> ----- Original Message -----
> > vhost-user-test is broken now: it assumes
> > QEMU sends RESET_OWNER, and we stopped doing that.
> > Wait for ENABLE_RING with 0 instead.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > tests/vhost-user-test.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
> > index 01cfc7e..022223b 100644
> > --- a/tests/vhost-user-test.c
> > +++ b/tests/vhost-user-test.c
> > @@ -70,6 +70,7 @@ typedef enum VhostUserRequest {
> > VHOST_USER_SET_VRING_ERR = 14,
> > VHOST_USER_GET_PROTOCOL_FEATURES = 15,
> > VHOST_USER_SET_PROTOCOL_FEATURES = 16,
> > + VHOST_USER_SET_VRING_ENABLE = 18,
> > VHOST_USER_MAX
> > } VhostUserRequest;
> >
> > @@ -315,8 +316,10 @@ static void chr_read(void *opaque, const uint8_t *buf,
> > int size)
> > g_cond_signal(&s->data_cond);
> > break;
> >
> > - case VHOST_USER_RESET_OWNER:
> > - s->fds_num = 0;
> > + case VHOST_USER_SET_VRING_ENABLE:
> > + if (!msg.payload.state.num) {
> > + s->fds_num = 0;
> > + }
> > break;
> >
> > default:
> > --
> > MST
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-16 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 12:35 [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE Michael S. Tsirkin
2015-11-16 12:58 ` Marc-André Lureau
2015-11-16 13:25 ` Marc-André Lureau
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).