Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-04 Thread Jason Wang
On 06/03/2015 09:40 PM, Stefan Hajnoczi wrote: > On Wed, Jun 3, 2015 at 10:42 AM, Jason Wang wrote: >> >> On 06/03/2015 03:56 PM, Thibaut Collet wrote: >>> Hi, >>> >>> thanks for your point, I did not notice the problem of the lost of ARP >>> announce by discarding the message. >>> So I must rew

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-03 Thread Stefan Hajnoczi
On Wed, Jun 3, 2015 at 10:42 AM, Jason Wang wrote: > > > On 06/03/2015 03:56 PM, Thibaut Collet wrote: >> Hi, >> >> thanks for your point, I did not notice the problem of the lost of ARP >> announce by discarding the message. >> So I must rewrite my patch to define a queue to transmit the ARP >> a

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-03 Thread Stefan Hajnoczi
On Wed, Jun 03, 2015 at 09:56:57AM +0200, Thibaut Collet wrote: > thanks for your point, I did not notice the problem of the lost of ARP > announce by discarding the message. > So I must rewrite my patch to define a queue to transmit the ARP announce > to the guest. Is it the proper solution? I'm

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-03 Thread Jason Wang
On 06/03/2015 03:56 PM, Thibaut Collet wrote: > Hi, > > thanks for your point, I did not notice the problem of the lost of ARP > announce by discarding the message. > So I must rewrite my patch to define a queue to transmit the ARP > announce to the guest. Is it the proper solution? > Please ha

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-03 Thread Jason Wang
On 06/01/2015 06:14 PM, Thibaut Collet wrote: > Hi, > > >- vhost-user set received_disabled to true to prevent this from > >happening. but looks like qemu_flush_or_purge_queue_packets() change it > >to false unconditionally. And I don't quite understand this, probably we > >can just remove this a

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-03 Thread Thibaut Collet
Hi, thanks for your point, I did not notice the problem of the lost of ARP announce by discarding the message. So I must rewrite my patch to define a queue to transmit the ARP announce to the guest. Is it the proper solution? Thanks. Best regards. Thibaut. On Tue, Jun 2, 2015 at 12:34 PM, Stef

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-02 Thread Stefan Hajnoczi
On Fri, May 29, 2015 at 04:28:48PM +0200, Thibaut Collet wrote: > I agree that virtio-net NIC never enqueues packet to vhost-user > but qemu_announce_self function (savevm.c file) can do it through > the qemu_announce_self_iter / qemu_send_packet_raw sequence. Does vhost-user support live migratio

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-01 Thread Thibaut Collet
Hi, >- vhost-user set received_disabled to true to prevent this from >happening. but looks like qemu_flush_or_purge_queue_packets() change it >to false unconditionally. And I don't quite understand this, probably we >can just remove this and the issue is fixed? I am afraid that solution can cause

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-06-01 Thread Jason Wang
On 05/28/2015 04:03 PM, Thibaut Collet wrote: > For netdev backend with no receive callback, packets must not be enqueued. > When > VM stops the enqueued packets are purged (see fixes ca77d85e1dbf). That > causes a > qemu segfault due to a call of a NULL pointer function. > > Function to create

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-05-29 Thread Thibaut Collet
Hi, I agree that virtio-net NIC never enqueues packet to vhost-user but qemu_announce_self function (savevm.c file) can do it through the qemu_announce_self_iter / qemu_send_packet_raw sequence. Regards Thibaut. On Fri, May 29, 2015 at 3:12 PM, Stefan Hajnoczi wrote: > On Thu, May 28, 2015 at

Re: [Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-05-29 Thread Stefan Hajnoczi
On Thu, May 28, 2015 at 10:03:14AM +0200, Thibaut Collet wrote: > For netdev backend with no receive callback, packets must not be enqueued. > When > VM stops the enqueued packets are purged (see fixes ca77d85e1dbf). That > causes a > qemu segfault due to a call of a NULL pointer function. virti

[Qemu-devel] [PATCH 1/1] net: fix queue's purge on VM stop

2015-05-28 Thread Thibaut Collet
For netdev backend with no receive callback, packets must not be enqueued. When VM stops the enqueued packets are purged (see fixes ca77d85e1dbf). That causes a qemu segfault due to a call of a NULL pointer function. Function to create net client is modified to allow backend to specify the size of