[Qemu-devel] [PATCH 2/2] vhost-user-bridge: fix resume regression (since 2.9)

Marc-André Lureau posted 2 patches 8 years, 2 months ago
There is a newer version of this series
[Qemu-devel] [PATCH 2/2] vhost-user-bridge: fix resume regression (since 2.9)
Posted by Marc-André Lureau 8 years, 2 months ago
Commit e10e798c85c2331 switched to libvhost-user which lacked support
for resuming the avail_idx based on used_idx.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1485867

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/vhost-user-bridge.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 1e5b5ca3da..dca48512ba 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -466,11 +466,18 @@ vubr_panic(VuDev *dev, const char *msg)
     vubr->quit = 1;
 }
 
+static bool
+vubr_queue_resume_to_used(VuDev *dev, int qidx)
+{
+    return true;
+}
+
 static const VuDevIface vuiface = {
     .get_features = vubr_get_features,
     .set_features = vubr_set_features,
     .process_msg = vubr_process_msg,
     .queue_set_started = vubr_queue_set_started,
+    .queue_resume_to_used = vubr_queue_resume_to_used,
 };
 
 static void
-- 
2.14.1.146.gd35faa819


Re: [Qemu-devel] [PATCH 2/2] vhost-user-bridge: fix resume regression (since 2.9)
Posted by Michael S. Tsirkin 8 years, 2 months ago
On Tue, Aug 29, 2017 at 04:48:05PM +0200, Marc-André Lureau wrote:
> Commit e10e798c85c2331 switched to libvhost-user which lacked support
> for resuming the avail_idx based on used_idx.
> 
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1485867
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Can we add a test for reconnect to catch the regression?

> ---
>  tests/vhost-user-bridge.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
> index 1e5b5ca3da..dca48512ba 100644
> --- a/tests/vhost-user-bridge.c
> +++ b/tests/vhost-user-bridge.c
> @@ -466,11 +466,18 @@ vubr_panic(VuDev *dev, const char *msg)
>      vubr->quit = 1;
>  }
>  
> +static bool
> +vubr_queue_resume_to_used(VuDev *dev, int qidx)
> +{
> +    return true;
> +}
> +
>  static const VuDevIface vuiface = {
>      .get_features = vubr_get_features,
>      .set_features = vubr_set_features,
>      .process_msg = vubr_process_msg,
>      .queue_set_started = vubr_queue_set_started,
> +    .queue_resume_to_used = vubr_queue_resume_to_used,
>  };
>  
>  static void
> -- 
> 2.14.1.146.gd35faa819

Re: [Qemu-devel] [PATCH 2/2] vhost-user-bridge: fix resume regression (since 2.9)
Posted by Marc-André Lureau 8 years, 2 months ago
Hi

On Tue, Aug 29, 2017 at 5:02 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Tue, Aug 29, 2017 at 04:48:05PM +0200, Marc-André Lureau wrote:
>> Commit e10e798c85c2331 switched to libvhost-user which lacked support
>> for resuming the avail_idx based on used_idx.
>>
>> Fixes:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1485867
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Can we add a test for reconnect to catch the regression?

There is no automated tests for vhost-user-bridge yet. We could
probably make one based on "[PATCH v2 0/5] tests/pxe-test: add
testcase using vhost-user-bridge" series.

We could also add seperate libvhost-user tests, that's not existent
yet, partly because libvhost-user was born as a test itself ;).

>
>> ---
>>  tests/vhost-user-bridge.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
>> index 1e5b5ca3da..dca48512ba 100644
>> --- a/tests/vhost-user-bridge.c
>> +++ b/tests/vhost-user-bridge.c
>> @@ -466,11 +466,18 @@ vubr_panic(VuDev *dev, const char *msg)
>>      vubr->quit = 1;
>>  }
>>
>> +static bool
>> +vubr_queue_resume_to_used(VuDev *dev, int qidx)
>> +{
>> +    return true;
>> +}
>> +
>>  static const VuDevIface vuiface = {
>>      .get_features = vubr_get_features,
>>      .set_features = vubr_set_features,
>>      .process_msg = vubr_process_msg,
>>      .queue_set_started = vubr_queue_set_started,
>> +    .queue_resume_to_used = vubr_queue_resume_to_used,
>>  };
>>
>>  static void
>> --
>> 2.14.1.146.gd35faa819
>



-- 
Marc-André Lureau

Re: [Qemu-devel] [PATCH 2/2] vhost-user-bridge: fix resume regression (since 2.9)
Posted by Michael S. Tsirkin 8 years, 2 months ago
On Tue, Aug 29, 2017 at 05:22:28PM +0200, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Aug 29, 2017 at 5:02 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Tue, Aug 29, 2017 at 04:48:05PM +0200, Marc-André Lureau wrote:
> >> Commit e10e798c85c2331 switched to libvhost-user which lacked support
> >> for resuming the avail_idx based on used_idx.
> >>
> >> Fixes:
> >> https://bugzilla.redhat.com/show_bug.cgi?id=1485867
> >>
> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Can we add a test for reconnect to catch the regression?
> 
> There is no automated tests for vhost-user-bridge yet. We could
> probably make one based on "[PATCH v2 0/5] tests/pxe-test: add
> testcase using vhost-user-bridge" series.

Exactly.

> We could also add seperate libvhost-user tests, that's not existent
> yet, partly because libvhost-user was born as a test itself ;).
> 
> >
> >> ---
> >>  tests/vhost-user-bridge.c | 7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>
> >> diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
> >> index 1e5b5ca3da..dca48512ba 100644
> >> --- a/tests/vhost-user-bridge.c
> >> +++ b/tests/vhost-user-bridge.c
> >> @@ -466,11 +466,18 @@ vubr_panic(VuDev *dev, const char *msg)
> >>      vubr->quit = 1;
> >>  }
> >>
> >> +static bool
> >> +vubr_queue_resume_to_used(VuDev *dev, int qidx)
> >> +{
> >> +    return true;
> >> +}
> >> +
> >>  static const VuDevIface vuiface = {
> >>      .get_features = vubr_get_features,
> >>      .set_features = vubr_set_features,
> >>      .process_msg = vubr_process_msg,
> >>      .queue_set_started = vubr_queue_set_started,
> >> +    .queue_resume_to_used = vubr_queue_resume_to_used,
> >>  };
> >>
> >>  static void
> >> --
> >> 2.14.1.146.gd35faa819
> >
> 
> 
> 
> -- 
> Marc-André Lureau