Re: [Qemu-devel] [PATCH] Revert "vhost: send SET_VRING_ENABLE at start/stop"

2015-11-25 Thread Thibaut Collet
g. > > Reported-by: Thibaut Collet > Cc: Yuanhan Liu > Signed-off-by: Michael S. Tsirkin > --- > hw/virtio/vhost.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > index 1794f0d..de29968 100644 > -

Re: [Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-25 Thread Thibaut Collet
On Wed, Nov 25, 2015 at 12:04 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 09:32:15AM +0800, Yuanhan Liu wrote: >> On Tue, Nov 24, 2015 at 11:23:34PM +0200, Michael S. Tsirkin wrote: >> > On Tue, Nov 24, 2015 at 10:05:27PM +0100, Thibaut Collet wrote: >> >

Re: [Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-24 Thread Thibaut Collet
On Tue, Nov 24, 2015 at 9:52 PM, Michael S. Tsirkin wrote: > On Tue, Nov 24, 2015 at 05:10:36PM +0100, Thibaut Collet wrote: >> This patch reverts partially commit 3a12f32229a. >> >> In case of live migration several queues can be enabled and not only the >> first >

[Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-24 Thread Thibaut Collet
attach operation. This function, called during the startup sequence, provides the correct state of the vring, even in case of live migration. So nothing has to be added to give the vring state to the backend at the startup. Signed-off-by: Thibaut Collet --- hw/virtio/vhost.c | 5 - 1 file

[Qemu-devel] [PATCH for-2.5 0/1] vhost-user: live migration with multiqueue fails

2015-11-24 Thread Thibaut Collet
Since commit 3a12f32229a live migration of vhost user, if multiqueue is set, fails: The state of the vring are lost, only the first queue pair is set to enable even if there are several queue pairs enabled. Thibaut Collet (1): vhost-user: do not send SET_VRING_ENABLE at start hw/virtio

Re: [Qemu-devel] [PATCH 1/1] vhost-user: modify SET_LOG_BASE only if VHOST_USER_PROTOCOL_F_LOG_SHMFD is set

2015-11-16 Thread Thibaut Collet
On Mon, Nov 16, 2015 at 6:09 PM, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2015 at 05:53:10PM +0100, Thibaut Collet wrote: >> On Mon, Nov 16, 2015 at 5:21 PM, Michael S. Tsirkin wrote: >> > On Mon, Nov 16, 2015 at 05:14:37PM +0100, Thibaut Collet wrote: >> >> Fi

Re: [Qemu-devel] [PATCH 1/1] vhost-user: modify SET_LOG_BASE only if VHOST_USER_PROTOCOL_F_LOG_SHMFD is set

2015-11-16 Thread Thibaut Collet
On Mon, Nov 16, 2015 at 5:21 PM, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2015 at 05:14:37PM +0100, Thibaut Collet wrote: >> Fixes: 2b8819c6eee5 ("vhost-user: modify SET_LOG_BASE to pass mmap size and >> offset") >> >> For compatibility with old vhos

[Qemu-devel] [PATCH 0/1] vhost-user: Adapt payload of SET_LOG_BASE regarding support of VHOST_USER_PROTOCOL_F_LOG_SHMFD

2015-11-16 Thread Thibaut Collet
For compatibility with old vhost backend (as vapp) payload of SET_LOG_BASE can not be modified. New payload (log size and offset) of this message is sent only for vhost backend that supports the VHOST_USER_PROTOCOL_F_LOG_SHMFD protocol feature. Thibaut Collet (1): vhost-user: modify

[Qemu-devel] [PATCH 1/1] vhost-user: modify SET_LOG_BASE only if VHOST_USER_PROTOCOL_F_LOG_SHMFD is set

2015-11-16 Thread Thibaut Collet
e has been negociated. The documentation has been updated accordingly with remarks from Marc André Lureau. Signed-off-by: Thibaut Collet --- docs/specs/vhost-user.txt | 16 ++-- hw/virtio/vhost-user.c| 12 +--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PATCH v2 1/1] vhost: set the correct queue index in case of migration with multiqueue

2015-10-21 Thread Thibaut Collet
to compute the expected vhost_vq_index for vhost kernel and vhost user. This change implies a modification of the vhost_virtqueue_start function to provide the index and not the vhost_vq_index. Signed-off-by: Thibaut Collet --- hw/virtio/vhost.c | 9 + 1 file changed, 5 insertions(+), 4

[Qemu-devel] [PATCH v2 0/1] vhost-user: support of live migration with multiqueue

2015-10-21 Thread Thibaut Collet
with multiqueue v1->v2: - call vhost_get_vq_index internally in vhost_virtqueue_set_addr Thibaut Collet (1): vhost: set the correct queue index in case of migration with multiqueue hw/virtio/vhost.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.1.4

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-20 Thread Thibaut Collet
On Tue, Oct 20, 2015 at 12:21 PM, Michael S. Tsirkin wrote: > On Tue, Oct 20, 2015 at 08:30:49AM +0200, Thibaut Collet wrote: >> On Mon, Oct 19, 2015 at 11:12 PM, Michael S. Tsirkin wrote: >> > On Mon, Oct 19, 2015 at 06:42:43PM +0200, Thibaut Collet wrote: >> >> &g

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-19 Thread Thibaut Collet
On Mon, Oct 19, 2015 at 11:12 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 06:42:43PM +0200, Thibaut Collet wrote: >> > >> > Can you pls check refs/heads/for_thibaut? >> > It should have your patch as the latest commit. >> >> I do not see yet m

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-19 Thread Thibaut Collet
On Mon, Oct 19, 2015 at 5:39 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 03:22:12PM +0200, Thibaut Collet wrote: >> On Sun, Oct 18, 2015 at 10:21 AM, Michael S. Tsirkin wrote: >> > >> > On Tue, Oct 13, 2015 at 02:19:41PM +0200, Thibaut Collet wrote: >

Re: [Qemu-devel] [PATCH 1/1] vhost: set the correct queue index in case of migration with multiqueue

2015-10-19 Thread Thibaut Collet
On Mon, Oct 19, 2015 at 5:41 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 02:59:27PM +0200, Thibaut Collet wrote: >> When a live migration is started the log address to mark dirty pages is >> provided >> to the vhost backend through the vhost_dev_set_log function

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-19 Thread Thibaut Collet
On Sun, Oct 18, 2015 at 10:21 AM, Michael S. Tsirkin wrote: > > On Tue, Oct 13, 2015 at 02:19:41PM +0200, Thibaut Collet wrote: > > Hi, > > > > I have still a comment on this serie. During rebase operation with > > multiqueue a > > modification has been l

[Qemu-devel] [PATCH 0/1] vhost-user: support of live migration with multiqueue

2015-10-19 Thread Thibaut Collet
with multiqueue Thibaut Collet (1): vhost: set the correct queue index in case of migration with multiqueue hw/virtio/vhost.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.1.4

[Qemu-devel] [PATCH 1/1] vhost: set the correct queue index in case of migration with multiqueue

2015-10-19 Thread Thibaut Collet
addresses of the queue pairs greater than 1 and behaviour of the vhost backend is unpredictable. The queue index is computed by taking account of the vq_index (to retrieve the queue pair index) and calling the vhost_get_vq_index method of the backend. Signed-off-by: Thibaut Collet --- hw/virtio

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-13 Thread Thibaut Collet
recent guest to give my ack yesterday. Marc Andre and Michael could you apply the attached fixup to the patch "vhost user: add support of live migration" on the pull request ? Thanks Best regards. On Mon, Oct 12, 2015 at 5:56 PM, Thibaut Collet wrote: > > > On Fri, Oct

Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support

2015-10-12 Thread Thibaut Collet
s the dirty log, only > vhost-user couldn't access the log memory until then. > > The series includes "vhost user: Add live migration" patches from > Thibaut Collet. > > v7->v8: > - rebased > - fix build on osx & aarch64 > - add seccomp patch f

Re: [Qemu-devel] [PULL 12/25] vhost: use a function for each call

2015-10-09 Thread Thibaut Collet
); > if (r) { > return -errno; > } > > state.num = virtio_queue_get_last_avail_idx(vdev, idx); > -r = dev->vhost_ops->vhost_call(dev, VHOST_SET_VRING_BASE, &state); > +r = dev->vhost_ops->vhost_set_vring_base(dev, &state); > if (r) { > retur

Re: [Qemu-devel] [PATCH v7 12/24] vhost: use a function for each call

2015-10-07 Thread Thibaut Collet
On Wed, Oct 7, 2015 at 5:58 PM, Marc-André Lureau wrote: > Hi Thibaut > > - Original Message - >> On Thu, Oct 1, 2015 at 7:23 PM, wrote: >> > From: Marc-André Lureau >> > >> > Replace the generic vhost_call() by specific functions for each >> > function call to help with type safety and

Re: [Qemu-devel] [PATCH v7 12/24] vhost: use a function for each call

2015-10-07 Thread Thibaut Collet
p;msg, NULL, 0); > + > +return 0; > +} > + > +static int vhost_user_set_features(struct vhost_dev *dev, > + uint64_t features) > +{ > +return vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, features); > +} > + > +static int vho

Re: [Qemu-devel] [PATCH v7 16/24] vhost user: add rarp sending after live migration for legacy guest

2015-10-02 Thread Thibaut Collet
On Fri, Oct 2, 2015 at 4:02 PM, Michael S. Tsirkin wrote: > On Fri, Oct 02, 2015 at 09:55:01AM -0400, Marc-André Lureau wrote: >> >> >> - Original Message - >> > On Thu, Oct 01, 2015 at 07:24:00PM +0200, marcandre.lur...@redhat.com >> > wrote: >> > > diff --git a/hw/net/vhost_net.c b/hw/n

Re: [Qemu-devel] [PATCH v5 15/21] vhost user: add rarp sending after live migration for legacy guest

2015-09-27 Thread Thibaut Collet
>> > On Thu, Sep 24, 2015 at 6:22 PM, wrote: >>> > > From: Thibaut Collet >>> > > >>> > > A new vhost user message is added to allow QEMU to ask to vhost user >>> > > backend to >>> > > broadcast a fake RARP after live mig

Re: [Qemu-devel] [PATCH v5 15/21] vhost user: add rarp sending after live migration for legacy guest

2015-09-24 Thread Thibaut Collet
On Thu, Sep 24, 2015 at 6:22 PM, wrote: > From: Thibaut Collet > > A new vhost user message is added to allow QEMU to ask to vhost user backend > to > broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE > capability. > > This new message is

Re: [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call

2015-09-21 Thread Thibaut Collet
On Sat, Sep 19, 2015 at 12:12 PM, wrote: > From: Marc-André Lureau > > Replace the generic vhost_call() by specific functions for each > function call to help with type safety and changing arguments. > > Signed-off-by: Marc-André Lureau > --- > hw/net/vhost_net.c| 12 +- > hw/

[Qemu-devel] [PATCH v6 2/2] vhost user: add rarp sending after live migration for legacy guest

2015-08-06 Thread Thibaut Collet
reception of this new message the vhost user backend must generate and broadcast a fake RARP request to notify the migration is terminated. Signed-off-by: Thibaut Collet --- docs/specs/vhost-user.txt | 15 +++ hw/net/vhost_net.c| 16 hw/virtio

[Qemu-devel] [PATCH v6 0/2] vhost user: Add live migration

2015-08-06 Thread Thibaut Collet
the migrated guest can suffer important network outage. - Some packets sent by remote peers to the guest can be lost during migration. The second patch fixes limitation for guest without GUEST_ANNOUNCE capabilities and patches from Marc Andre Lureau fix potential packet's lost during migration.

[Qemu-devel] [PATCH v6 1/2] vhost user: add support of live migration

2015-08-06 Thread Thibaut Collet
anages virtio driver to send 4 bootp/dhcp request in case of dummy boot. => These packets must be discarded. Signed-off-by: Thibaut Collet --- hw/net/vhost_net.c |2 ++ net/vhost-user.c | 12 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v5 1/2] vhost user: add support of live migration

2015-08-05 Thread Thibaut Collet
On Tue, Aug 4, 2015 at 7:50 PM, Marc-André Lureau wrote: > Hi Thibaut > > On Mon, Aug 3, 2015 at 11:22 AM, Thibaut Collet > wrote: >> Some vhost user backends are able to support live migration. >> To provide this service the following features must

Re: [Qemu-devel] [PATCH v5 2/2] vhost user: add rarp sending after live migration for legacy guest

2015-08-04 Thread Thibaut Collet
On Tue, Aug 4, 2015 at 8:22 AM, Jason Wang wrote: > > > On 08/03/2015 05:22 PM, Thibaut Collet wrote: >> A new vhost user message is added to allow QEMU to ask to vhost user backend >> to >> broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE &g

[Qemu-devel] [PATCH v5 2/2] vhost user: add rarp sending after live migration for legacy guest

2015-08-03 Thread Thibaut Collet
reception of this new message the vhost user backend must generate and broadcast a fake RARP request to notify the migration is terminated. Signed-off-by: Thibaut Collet --- docs/specs/vhost-user.txt | 15 +++ hw/net/vhost_net.c| 16 hw/virtio

[Qemu-devel] [PATCH v5 0/2] vhost user: Add live migration

2015-08-03 Thread Thibaut Collet
ation for guest without GUEST_ANNOUNCE capabilities and patches from Marc Andre Lureau fix potential packet's lost during migration. Thibaut Collet (2): vhost user: add support of live migration vhost user: add rarp sending after live migration for legacy guest docs/specs/vhost-user.txt

[Qemu-devel] [PATCH v5 1/2] vhost user: add support of live migration

2015-08-03 Thread Thibaut Collet
GUEST_ANNOUNCE capabilities these packets are discarded too, migration termination is notified when the guest sends packets. Signed-off-by: Thibaut Collet --- hw/net/vhost_net.c |2 ++ net/vhost-user.c | 25 +++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH 0/4] vhost-user: protocol updates

2015-07-24 Thread Thibaut Collet
On Fri, Jul 17, 2015 at 4:09 PM, Michael S. Tsirkin wrote: > This patchset sets the stage for extending the vhost user > protocol, with full backwards compatibility. > > The approach is to negotiate feature bits queried and > acknowledged during device setup. > > For now, there's no new functional

[Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-06-26 Thread Thibaut Collet
RARP packets automatically send by qemu_announce_self after a migration. These packets are useless for vhost user and just discarded. Signed-off-by: Thibaut Collet --- hw/net/vhost_net.c |2 ++ net/vhost-user.c | 21 +++-- 2 files changed, 21 insertions(+), 2 deletions

[Qemu-devel] [PATCH v4 0/1] Add live migration for vhost user

2015-06-26 Thread Thibaut Collet
ble to send the RARP for guest that does not support VIRTIO_NET_F_GUEST_ANNOUNCE. More tricks will be delivered later ([PATCH RFC]) to help vhost user backend to send RARP at the best time (today RARP is sent when the virtual ring is kicked and can occur late). Thibaut Collet (1): vhost u

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-25 Thread Thibaut Collet
On Thu, Jun 25, 2015 at 2:53 PM, Michael S. Tsirkin wrote: > On Thu, Jun 25, 2015 at 01:01:29PM +0200, Thibaut Collet wrote: >> On Thu, Jun 25, 2015 at 11:59 AM, Jason Wang wrote: >> > >> > >> > >> > On 06/24/2015 07:05 PM, Michael S. Tsirkin wro

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-25 Thread Thibaut Collet
ue, Jun 23, 2015 at 10:12:17AM +0800, Jason Wang wrote: > >>>>> > >>>>> On 06/18/2015 11:16 PM, Thibaut Collet wrote: > >>>>>>> On Tue, Jun 16, 2015 at 10:05 AM, Jason Wang > >>>>>>> wrote: > &

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-18 Thread Thibaut Collet
On Tue, Jun 16, 2015 at 10:05 AM, Jason Wang wrote: > > > On 06/16/2015 03:24 PM, Thibaut Collet wrote: >> If my understanding is correct, on a resume operation, we have the >> following callback trace: >> 1. virtio_pci_restore function that calls all restore call bac

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-17 Thread Thibaut Collet
On Wed, Jun 17, 2015 at 8:42 AM, Michael S. Tsirkin wrote: > On Wed, Jun 17, 2015 at 12:16:09PM +0800, Jason Wang wrote: >> >> >> On 06/16/2015 04:16 PM, Thibaut Collet wrote: >> > For a live migration my understanding is there are a suspend resume >>

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-16 Thread Thibaut Collet
last pages are copied, and the VM is resumed on the new host. Migration is not totally transparent to guest that has a small period of unavailability. On Tue, Jun 16, 2015 at 10:05 AM, Jason Wang wrote: > > > On 06/16/2015 03:24 PM, Thibaut Collet wrote: >> If my understanding i

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-16 Thread Thibaut Collet
queue (through virtqueue_kick function) On Tue, Jun 16, 2015 at 7:29 AM, Jason Wang wrote: > > > On 06/15/2015 08:12 PM, Thibaut Collet wrote: >> After a resume operation the guest always kicks the backend for each >> virtual queues. >> A live migration does a suspend op

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-15 Thread Thibaut Collet
does not work (today I have not found a case) I will prefer to implement this solution. On Mon, Jun 15, 2015 at 2:45 PM, Michael S. Tsirkin wrote: > On Mon, Jun 15, 2015 at 02:12:40PM +0200, Thibaut Collet wrote: >> After a resume operation the guest always kicks the backend for each &

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-15 Thread Thibaut Collet
ote: >> >> >> On 06/12/2015 10:28 PM, Michael S. Tsirkin wrote: >> > On Fri, Jun 12, 2015 at 03:55:33PM +0800, Jason Wang wrote: >> >> >> >> On 06/11/2015 08:13 PM, Michael S. Tsirkin wrote: >> >>> On Thu, Jun 11, 2015 at 02:10:48PM +0200,

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-12 Thread Thibaut Collet
out involving QEMU. Michael, could you confirm that my analysis is correct? On Fri, Jun 12, 2015 at 9:55 AM, Jason Wang wrote: > > > On 06/11/2015 08:13 PM, Michael S. Tsirkin wrote: >> On Thu, Jun 11, 2015 at 02:10:48PM +0200, Thibaut Collet wrote: >>> I am not sur

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-11 Thread Thibaut Collet
015 at 02:10:48PM +0200, Thibaut Collet wrote: > > I am not sure to understand your remark: > > > > > It needs to be sent when backend is activated by guest kick > > > (in case of virtio 1, it's possible to use DRIVER_OK for this). > > > This does not hap

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-11 Thread Thibaut Collet
SET_VRING_KICK reception. Maybe switch notification of live migration is done with a small delay but it works - This patch can be discarded. On Thu, Jun 11, 2015 at 12:38 PM, Michael S. Tsirkin wrote: > On Thu, Jun 11, 2015 at 01:54:22PM +0800, Jason Wang wrote: > > > > > &

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-10 Thread Thibaut Collet
> Yes, but still need a mechanism to notify the backend of migration > completion from qemu side if GUEST_ANNOUNCE is not negotiated. backend is aware of a connection with the guest (with the feature negociation) and can send a rarp. This rarp will be always sent by the backend when a VM is launch

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-10 Thread Thibaut Collet
The warning message is not really necessary is just a reminder. On Wed, Jun 10, 2015 at 10:50 PM, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2015 at 10:25:57PM +0200, Thibaut Collet wrote: > > Yes backend can save everything to be able to send the rarp alone after > a live &

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-10 Thread Thibaut Collet
, 2015 at 6:00 PM, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2015 at 05:48:47PM +0200, Thibaut Collet wrote: > > I have involved QEMU because QEMU prepares the rarp. I agree that > backend has > > probably all the information to do that. > > But backend does not know if

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-10 Thread Thibaut Collet
case this patch is not mandatory. On Wed, Jun 10, 2015 at 5:34 PM, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2015 at 03:43:03PM +0200, Thibaut Collet wrote: > > In case of live migration with legacy guest (without > VIRTIO_NET_F_GUEST_ANNOUNCE) > > a message is added between

Re: [Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migration

2015-06-10 Thread Thibaut Collet
2:10PM +0200, Thibaut Collet wrote: > > I am not sure to understand your comments. > > > > Could you confirm that the useless warning is: > > +fprintf(stderr, > > +"Warning: Guest with no VIRTIO_NET_F_GUEST_ANNOUNCE > support. > > RA

Re: [Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migration

2015-06-10 Thread Thibaut Collet
27;s not a generic function, is it? Which part of the code do you think it must be moved in a specific file ? On Wed, Jun 10, 2015 at 3:52 PM, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2015 at 03:43:02PM +0200, Thibaut Collet wrote: > > Some vhost client/backend are able to sup

[Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-10 Thread Thibaut Collet
-off-by: Thibaut Collet --- docs/specs/vhost-user.txt | 16 hw/net/vhost_net.c |8 hw/virtio/vhost-user.c | 11 ++- linux-headers/linux/vhost.h |9 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/specs/vhost

[Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migration

2015-06-10 Thread Thibaut Collet
(already done by virtio-net NIC). For legacy guest without VIRTIO_NET_F_GUEST_ANNOUNCE a warning message is displayed to alert the user. RARP must be sent to the vhost client/backend. Signed-off-by: Thibaut Collet --- hw/net/vhost_net.c | 15 +++ include/net/vhost_net.h |1

[Qemu-devel] [PATCH v3 0/2] Add live migration for vhost user

2015-06-10 Thread Thibaut Collet
est is managed by the virtio-net NIC). Otherwise the RARP packet is transmitted to the vhost client/backend that is responsible to send the RARP Thibaut Collet (2): vhost user: add support of live migration vhost user: Add RARP injection for legacy guest docs/specs/vhost-user.txt |

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
5 at 3:05 PM, Thibaut Collet > wrote: > >> I think Jason is pointing out that your patch lacks support for guests > >> that do not negotiate VIRTIO_NET_F_GUEST_ANNOUNCE. > > > > I have understood the issue with old guest pointed by Jason. > > I have thinking ab

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
easy to see your new patches in threaded email clients. I have used the same email thread as it is a reworked of my first patch. I will create a new email thread for the next version. On Mon, Jun 8, 2015 at 3:32 PM, Stefan Hajnoczi wrote: > On Mon, Jun 08, 2015 at 10:21:38AM +0200, Thibaut Collet wr

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
n 8, 2015 at 2:45 PM, Michael S. Tsirkin wrote: > On Mon, Jun 08, 2015 at 01:29:39PM +0200, Thibaut Collet wrote: > > Hi, > > > > > I don't think qemu_send_packet_raw can ever work for vhost user. > > > What happens if you merely add VIRTIO_NET_F_GUEST_ANNOU

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
client/backend send the RARP. But maybe it will be easier to let QEMU send directly the RARP message on the network interface created by vhost user. This point can be done later if it is needed. Regards. On Mon, Jun 8, 2015 at 12:12 PM, Michael S. Tsirkin wrote: > On Fri, Jun 05, 2015 at 0

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
, Jason Wang wrote: > > > On 06/08/2015 04:21 PM, Thibaut Collet wrote: > > Hi, > > > > My understanding of gratuitous packet with virtio for any backend > > (vhost user or other): > > - When the VM is loaded (first start or migration) the virtio net > > i

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-08 Thread Thibaut Collet
. Regards. On Mon, Jun 8, 2015 at 7:55 AM, Jason Wang wrote: > > > On 06/05/2015 09:24 PM, Thibaut Collet wrote: > > Add VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev > backend is > > vhost-user. > > > > For netdev backend using virtio-net NIC the

[Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user

2015-06-05 Thread Thibaut Collet
QEMU) a bitfield is added in the NetClientState structure. If this bit is set self announce does not send message to the guest to request gratuitous ARP but let virtio-net NIC set the VIRTIO_NET_S_ANNOUNCE for gratuitous ARP. Signed-off-by: Thibaut Collet --- v2: do not discard anymore packets

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

2015-06-03 Thread Thibaut Collet
, Stefan Hajnoczi wrote: > 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_r

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

2015-06-01 Thread Thibaut Collet
by the system when qemu stops but it can increase the risk of memory leak. Regards. Thibaut. On Mon, Jun 1, 2015 at 11:17 AM, Jason Wang wrote: > > > On 05/28/2015 04:03 PM, Thibaut Collet wrote: > > For netdev backend with no receive callback, packets must not be > enqueue

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

2015-05-29 Thread Thibaut Collet
015 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 f

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

2015-05-28 Thread Thibaut Collet
of the queue. For netdev backend with no receive callback, the queue size is set to 0 to prevent enqueuing of packets. For other netdev backend, a default queue size is provided. This value (set to 1) is the value previously set to any queue. Signed-off-by: Thibaut Collet --- include/net/net.h