vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
PATCH 1/1 vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
vhost-user-test is broken now: it assumes QEMU sends RESET_OWNER, and we stopped doing that. Wait for ENABLE_RING with 0 instead.
--- tests/vhost-user-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
tests/vhost-user-test.c +5 -2
@@ -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 :
Signature · 1 line
MST
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 -----
Quoted 38 lines
vhost-user-test is broken now: it assumes QEMU sends
RESET_OWNER, and we stopped doing that. Wait forENABLE_RINGwith 0 instead.Signed-off-by Michael S. Tsirkin <[email protected]>--- tests/vhost-user-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)tests/vhost-user-test.c +5
-2@@ -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
Hi
----- Original Message -----
Quoted 6 lines
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.
Quoted 41 lines
----- Original Message -----
Quoted 38 lines
vhost-user-test is broken now: it assumes QEMU sends
RESET_OWNER, and we stopped doing that. Wait forENABLE_RINGwith 0 instead.Signed-off-by Michael S. Tsirkin <[email protected]>--- tests/vhost-user-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)tests/vhost-user-test.c +5
-2@@ -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