public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 0/9] vhost-user: Migration support
Date: Fri, 17 Jan 2025 13:44:45 +0100	[thread overview]
Message-ID: <20250117134445.5b341bdd@elisabeth> (raw)
In-Reply-To: <329e349d-f86c-479b-97ee-61397aa28c60@redhat.com>

On Fri, 17 Jan 2025 13:13:36 +0100
Laurent Vivier <lvivier@redhat.com> wrote:

> On 19/12/2024 12:13, Laurent Vivier wrote:
> > This series allows a QEMU guest to be migrated while it is connected
> > to Passt using vhost-user interface.
> > 
> > There are two parts:
> > 
> > - first part enables the migration of QEMU without transferring the
> >    internal state of Passt. All connections are lost.
> > 
> >    This is done by implementing VHOST_USER_SET_LOG_FD and
> >    VHOST_USER_SET_LOG_BASE commands (and enabling
> >    VHOST_USER_PROTOCOL_F_LOG_SHMFD feature)
> > 
> >    "vhost-user: add VHOST_USER_SET_LOG_FD command"
> >    "vhost-user: add VHOST_USER_SET_LOG_BASE command"
> >    "vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_LOG_SHMFD"
> > 
> > - second part allows source Passt instance to send its internal
> >    state using QEMU migration channel to destination Passt instance.
> > 
> >    This is done implementing VHOST_USER_SET_DEVICE_STATE_FD and
> >    VHOST_USER_CHECK_DEVICE_STATE (and enabling
> >    VHOST_USER_PROTOCOL_F_DEVICE_STATE feature).
> > 
> >    "vhost-user: add VHOST_USER_CHECK_DEVICE_STATE command"
> >    "vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command"
> >    "vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_DEVICE_STATE"
> > 
> >    For now, it only implements the function needed to transfer the
> >    state but no state is transferred.
> > 
> >    VHOST_USER_PROTOCOL_F_DEVICE_STATE is implemented in QEMU
> >    only for vhost-user-fs, to be able to use it with virtio-net
> >    I have proposed a patch upstream:
> > 
> >    https://patchew.org/QEMU/20241218143453.1573185-1-lvivier@redhat.com/
> > 
> > Laurent Vivier (9):
> >    virtio: Use const pointer for vu_dev
> >    vhost-user: update protocol features and commands list
> >    vhost-user: add VHOST_USER_SET_LOG_FD command
> >    vhost-user: Pass vu_dev to more virtio functions
> >    vhost-user: add VHOST_USER_SET_LOG_BASE command
> >    vhost-user: Report to front-end we support
> >      VHOST_USER_PROTOCOL_F_LOG_SHMFD
> >    vhost-user: add VHOST_USER_CHECK_DEVICE_STATE command
> >    vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command
> >    vhost-user: Report to front-end we support
> >      VHOST_USER_PROTOCOL_F_DEVICE_STATE
> > 
> >   epoll_type.h |   2 +
> >   passt.c      |   4 +
> >   util.h       |   3 +
> >   vhost_user.c | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> >   vhost_user.h |  50 +++++++++-
> >   virtio.c     | 116 +++++++++++++++++++++---
> >   virtio.h     |  32 +++++--
> >   vu_common.c  |  59 +++++++++++-
> >   vu_common.h  |   3 +-
> >   9 files changed, 484 insertions(+), 36 deletions(-)
> >   
> 
> Another point:
> 
> vhost-user can ask backend (passt) to send a notification at the end of the migration on 
> the destination side to the network to update the network topology. Do we need this?
> 
> This is VHOST_USER_SEND_RARP:
> "Ask vhost user back-end to broadcast a fake RARP to notify the migration is terminated 
> for guest that does not support GUEST_ANNOUNCE.
> 
> Only legal if feature bit VHOST_USER_F_PROTOCOL_FEATURES is present in 
> VHOST_USER_GET_FEATURES and protocol feature bit VHOST_USER_PROTOCOL_F_RARP is present in 
> VHOST_USER_GET_PROTOCOL_FEATURES. The first 6 bytes of the payload contain the mac address 
> of the guest to allow the vhost user back-end to construct and broadcast the fake RARP."

This isn't really clear :( ...what does "fake RARP" even mean? RARP is
a protocol, and an obsolete one, despite:

  https://en.wikipedia.org/wiki/Reverse_Address_Resolution_Protocol#Modern_Day_Uses

Anyway, it comes from 3e866365e1eb ("vhost user: add rarp sending after
live migration for legacy guest").

I have no idea what "legacy" means here, but I'm under the impression that
somebody just needed a way to notify the guest of the finished migration
(nothing related to networking) and, correct me if I'm wrong, the French
word for "fake" is rather similar to the one for "dummy".

So my understanding of it is that they would just send a dummy packet,
and a RARP broadcast would be a good candidate because it's otherwise
unused, but wouldn't raise any firewall alert.

Or maybe "legacy" has something to do with VMware vSphere, and there was
some guest previously running on VMware vSphere that needs a RARP packet
to "proceed" with something after the migration.

If that's the case, and if there's still something like that around, I
guess that ideally we want it for compatibility, but it's *very* unlikely
to ever bite us.

So all in all I would say that if the implementation is very small and
unproblematic we can hack up something in arp.c to build a RARP packet
(example here: https://wiki.wireshark.org/RARP but that's a request, not
a broadcast). Otherwise I wouldn't really care until somebody asks.

-- 
Stefano


  reply	other threads:[~2025-01-17 12:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 11:13 [PATCH 0/9] vhost-user: Migration support Laurent Vivier
2024-12-19 11:13 ` [PATCH 1/9] virtio: Use const pointer for vu_dev Laurent Vivier
2024-12-20  0:24   ` David Gibson
2025-01-06  8:58     ` Stefano Brivio
2024-12-19 11:13 ` [PATCH 2/9] vhost-user: update protocol features and commands list Laurent Vivier
2025-01-17 18:04   ` Stefano Brivio
2024-12-19 11:13 ` [PATCH 3/9] vhost-user: add VHOST_USER_SET_LOG_FD command Laurent Vivier
2025-01-17 18:04   ` Stefano Brivio
2024-12-19 11:13 ` [PATCH 4/9] vhost-user: Pass vu_dev to more virtio functions Laurent Vivier
2024-12-19 11:13 ` [PATCH 5/9] vhost-user: add VHOST_USER_SET_LOG_BASE command Laurent Vivier
2025-01-17 18:05   ` Stefano Brivio
2025-01-20 10:57     ` Laurent Vivier
2025-01-17 19:10   ` Stefano Brivio
2024-12-19 11:13 ` [PATCH 6/9] vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_LOG_SHMFD Laurent Vivier
2024-12-19 11:13 ` [PATCH 7/9] vhost-user: add VHOST_USER_CHECK_DEVICE_STATE command Laurent Vivier
2024-12-19 11:13 ` [PATCH 8/9] vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command Laurent Vivier
2024-12-19 19:47   ` Stefano Brivio
2024-12-20  7:56     ` Laurent Vivier
2024-12-20 13:28       ` Stefano Brivio
2025-01-17 18:05   ` Stefano Brivio
2025-01-20 11:00     ` Laurent Vivier
2025-01-20 20:09       ` Stefano Brivio
2024-12-19 11:14 ` [PATCH 9/9] vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_DEVICE_STATE Laurent Vivier
2025-01-17 12:13 ` [PATCH 0/9] vhost-user: Migration support Laurent Vivier
2025-01-17 12:44   ` Stefano Brivio [this message]
2025-01-17 13:27     ` Laurent Vivier
2025-01-17 13:38       ` Stefano Brivio
2025-01-17 13:58         ` Laurent Vivier
2025-01-17 14:29           ` Stefano Brivio
2025-01-17 13:31     ` Stefano Brivio
2025-01-17 16:51 ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250117134445.5b341bdd@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).