From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyJmu-0000AM-Vn for qemu-devel@nongnu.org; Mon, 16 Nov 2015 08:25:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyJmr-00006N-1E for qemu-devel@nongnu.org; Mon, 16 Nov 2015 08:25:40 -0500 Received: from mx5-phx2.redhat.com ([209.132.183.37]:39916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyJmq-00005z-Og for qemu-devel@nongnu.org; Mon, 16 Nov 2015 08:25:36 -0500 Date: Mon, 16 Nov 2015 08:25:35 -0500 (EST) From: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Message-ID: <1840450290.9531187.1447680335256.JavaMail.zimbra@redhat.com> In-Reply-To: <906413158.9497990.1447678680554.JavaMail.zimbra@redhat.com> References: <1447677327-8957-1-git-send-email-mst@redhat.com> <906413158.9497990.1447678680554.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Marcel Apfelbaum , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Yuanhan Liu , qemu-devel@nongnu.org, 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 > > --- > > 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 > > >